From bd97a51bf7cfb267101b1297c90b456ab9232ea7 Mon Sep 17 00:00:00 2001 From: jitendracandela <78074038+jitendracandela@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:04:47 +0530 Subject: [PATCH] Wifi 1321 create a lan forge pip module (#745) * Added rate-limiting in both android_test and ios_test * Removed ow_sanity_lf marker Signed-off-by: jitendracandela * Added ow_sanity_lf marker Signed-off-by: jitendracandela * Removed ow_sanity_lf marker Signed-off-by: jitendracandela * Removed ow_sanity_lf marker Signed-off-by: jitendracandela * Added ow_sanity_lf marker Signed-off-by: jitendracandela * Added missing methods Signed-off-by: jitendracandela * Modified as per new framework Signed-off-by: jitendracandela * Added ow_sanity_lf marker for channel 11 Signed-off-by: jitendracandela * Added rate-limiting test_cases * added ow_sanity_lf marker to multipsk & multivlan tests * Added allure_testcase-links for client_connect in validation_of_operating_modes(bridge,nat,vlan) * Added ow_sanity_lf marker * Removed unwanted ow_sanity_lf marker * allure suite and titles changed for mpsk & mvlan tests Signed-off-by: anil-tegala * Added rate_limiting test_cases with jira links in validation_of_operating_mode(bridge,nat,vlan) * Added rate_radius_info and rate_radius_accounting_info Signed-off-by: jitendracandela * Modified code for two test cases as per new infra Signed-off-by: jitendracandela * Addded radius_auth_data radius_acc_data Signed-off-by: jitendracandela * Added radius_auth_data and radius_acc_data for rate limiting with radius test cases Signed-off-by: jitendracandela * Added basic-07 Signed-off-by: jitendracandela * Converted num station in int Signed-off-by: jitendracandela * Removed unnecessary interop testbed details from lab_info Signed-off-by: haricharan-jaka * Added Enterprise cleint connect and client connectivity tests in Android Signed-off-by: haricharan-jaka * Added Enterprise cleint connect and client connectivity tests in iOS Signed-off-by: haricharan-jaka * Added new sanity marker for Interop testcases Signed-off-by: haricharan-jaka * Added Enterprise mode client connect test cases in Interop Signed-off-by: haricharan-jaka * Added random string addition in Interop testcases for setup profiles ssids Signed-off-by: haricharan-jaka * Added random string addition in Interop testcases for setup profiles ssids Signed-off-by: haricharan-jaka * changed WAN upstream port for interop testbeds * Added the logic for retest the ucentral connectivity if it is disconnected Signed-off-by: shivam * Added NAT-WAN Signed-off-by: jitendracandela * gw - get commands api fix * Removed sanity marker on vlan testcases Signed-off-by: haricharan-jaka * FIxed issue in DFS Signed-off-by: jitendracandela * Changed allure report name for Enterprise mode Signed-off-by: haricharan-jaka * Added Pytest exit in case of error when testbed data is not available Signed-off-by: shivam * Fixed the string concat from previous commit Signed-off-by: shivam * Added check_connectivity fixture on every client_connectivity and dfs test case Signed-off-by: shivam * Made some bug fixes on testcases Signed-off-by: haricharan-jaka * Changed profile data in testcases to match setup params Signed-off-by: haricharan-jaka * Added new fix in manual pytest execution workflow as per master Signed-off-by: haricharan-jaka * Added new fix in sanity workflow as per master Signed-off-by: haricharan-jaka * Changed ssid names in setup params of general test cases Signed-off-by: haricharan-jaka * Added Enterprise mode library support for wifi connect Signed-off-by: haricharan-jaka * Removed Interop sanity marker from test connectivity file Signed-off-by: haricharan-jaka * commented newly added methods for test connectivity Signed-off-by: jitendracandela * commented traffic_generator_connectivity Signed-off-by: jitendracandela * changed as new infra Signed-off-by: jitendracandela * Removed interop_uc_sanity Signed-off-by: jitendracandela * Removed marker description Signed-off-by: jitendracandela * Added needed step for S20,S10 for forget ssid Signed-off-by: haricharan-jaka * Fixed the ap libs command for ucentral restart Signed-off-by: shivam * Added test controller connectivity Signed-off-by: shivam * Changed markers as per pytest.ini Signed-off-by: jitendracandela * Refractored dvlan Signed-off-by: karthikaeyetea * Added eth table and max station table in allure for test_traffic_generator_connectivity Signed-off-by: jitendracandela * changed scope of Interop testcase name fixture Signed-off-by: haricharan-jaka * Added the fix for rate limiting test with vlans. Added Access Point connectivity Tests Signed-off-by: shivam * Changed scope of get test lib fixture Signed-off-by: haricharan-jaka * Changed markers Signed-off-by: jitendracandela * Added run-lf condition in check_connectivity Signed-off-by: jitendracandela * Added test case in the library function of setup_perfecto mobile data Signed-off-by: haricharan-jaka * Removed interop testcase name fixture Signed-off-by: haricharan-jaka * Added new fail msg for Interop tests for better debugging Signed-off-by: haricharan-jaka * Added fix for testcase name in setup perfecto data Signed-off-by: haricharan-jaka * Added check_connectivity Signed-off-by: jitendracandela * Added ow_sanity_lf marker Signed-off-by: jitendracandela * Refractored DVLAN Signed-off-by: karthikaeyetea * Added lab_info.json back due to unexpected deletion Signed-off-by: karthikaeyetea * Added skip-all work with all test cases and removed the broken test cases Signed-off-by: shivam * Renoved the unwanted print for getting marker Signed-off-by: shivam * Provided vlan id in list Signed-off-by: jitendracandela * Added proper feature and parent suite Signed-off-by: jitendracandela * [WIFI-11228] Add: manual workflow step with details on namespace (#727) Signed-off-by: Dmitry Dunaev Signed-off-by: Dmitry Dunaev * fixed incorrect security parameter in MVLAN test functions Signed-off-by: anil-tegala * Added Comments on the Library Functions for Proper Understanding Signed-off-by: haricharan-jaka * Added 6G RADIO Config data Signed-off-by: shivam * Removed the sync_repos.bash as it is not needed now Signed-off-by: shivam * Added proper suite, subsuite, parent suite, feature, title Signed-off-by: jitendracandela * Changed method name wifi_capacity to rate_limiting_test Signed-off-by: jitendracandela * Refactored dvlan in wpa3_eap Signed-off-by: karthikaeyetea * old mvlan test files removed Signed-off-by: anil-tegala * marker name corrections in SDK API tests Signed-off-by: anil-tegala * descritpion and marker changes in mvlan tests Signed-off-by: anil-tegala * Added suite,sub_suite,parent,feature for IN,RU,SG Signed-off-by: karthikaeyetea * Modified as per new freamework and enhanced allure and changed file name to dynamic qos Signed-off-by: jitendracandela * Changed country from CA to US Signed-off-by: jitendracandela * Added 6g in get_applied_ssid_info method Signed-off-by: jitendracandela * Changed manager ip to localhost Signed-off-by: jitendracandela * Added FMS Tests Signed-off-by: shivam * added basic-08 & advance-01 info for tunneling Signed-off-by: anil-tegala * Added improvements around pass and fail for ap connectivity and added basic lab_info format Signed-off-by: shivam * Added proper feature, parent suite, suite, sub_suite and title Signed-off-by: jitendracandela * Added Toggle-Wifi Button Functionality for both android and ios tests file Signed-off-by: tarun-candela * Added toggle_wifi_mode test-cases for bridge,nat,vlan modes Signed-off-by: tarun-candela * Added fix for 2.4g based bssid band data Signed-off-by: shivam * rempved rate_limiting_tests marker Signed-off-by: jitendracandela * Refractored channel vs country code * Corrected setup_basic_configuration Signed-off-by: karthikaeyetea * Added reports dir creation logic Signed-off-by: jitendracandela * vlan id's passed to test functions in mvlan Signed-off-by: anil-tegala * removed security_key from open test case Signed-off-by: jitendracandela * Fixed scan ssid issue in vlan Signed-off-by: jitendracandela * Fixed scan ssid issue and wrong security issue Signed-off-by: jitendracandela * changed vlan id for test_disable_vlan_wpa2_2g test case Signed-off-by: jitendracandela * Changed dataplane_throughput_test marker to dataplane_tests Signed-off-by: jitendracandela * Changed password for controller Signed-off-by: jitendracandela * updated controller credentials in lab-info & tunnel_bash Signed-off-by: anil-tegala * Fixed TypeError: can only concatenate str (not dict) to str issue Signed-off-by: jitendracandela * Changed parent_suite from OpenWifi Dynamic Vlan Test to Dynamic Vlan Test Signed-off-by: jitendracandela * Fix: resolved Pixel 4 scroll down issue, by modifying scrollDown() in android_libs.py Signed-off-by: tarun-candela * reverted old password in controller info Signed-off-by: anil-tegala * IP validation issue in DVLAN Signed-off-by: karthikaeyetea * Removed traffic_generator_connectivity test case and Modification for allure enhancement Signed-off-by: jitendracandela * Changed parent suite and suite Signed-off-by: jitendracandela * Renamed dynamic_qos_tests to rate_limiting_with_radius_tests Signed-off-by: jitendracandela * Changed parent suite to Throughput Benchmark Test Signed-off-by: jitendracandela * Added missing key_mgmt for wp3 Signed-off-by: jitendracandela * key_mgmt issue in DVLAN-wpa3e Signed-off-by: karthikaeyetea * Added security markers Signed-off-by: jitendracandela * [WIFI-11619] Upd: Docker instructions update (#739) Signed-off-by: Dmitry Dunaev Signed-off-by: Dmitry Dunaev * DVLAN admin_up issue Signed-off-by: karthikaeyetea * Added pk_passwd and num_stations Signed-off-by: jitendracandela * Added num_stations Signed-off-by: jitendracandela * Added num_stations, execution_number and In tls added pk_passwd argument Signed-off-by: jitendracandela * Added max stations Signed-off-by: jitendracandela * Added client_scale_tests Signed-off-by: jitendracandela * Added 6GHz test cases Signed-off-by: jitendracandela * Added new test channels Signed-off-by: karthikaeyetea * Added execution_number in parametrize Signed-off-by: jitendracandela * added new marker for general security mode testcases in Interop Signed-off-by: haricharan-jaka * Changed one ssid with internet variable logic for Interop android Signed-off-by: haricharan-jaka * Added proper feature, parent_suite, suite, sub_suite, title in allure report for client_scale_test and dataplane_throughput_test Signed-off-by: jitendracandela * Changed the teardown logic in android tests Signed-off-by: haricharan-jaka * Added global devicemodel in teardown function of Android Signed-off-by: haricharan-jaka * Added return statement for IP address Signed-off-by: haricharan-jaka * Added return statement for IP address Signed-off-by: haricharan-jaka * Changed ip addr of rate limiting radius server to 10.28.3.100 Signed-off-by: jitendracandela * Changed ingress-rate to 10 and egress-rate to 5 Signed-off-by: jitendracandela * Added pre-cleanup for deleting existing stations Signed-off-by: jitendracandela * [WIFI-11619] Fix: Docker example command Signed-off-by: Dmitry Dunaev * Changed RATE LIMITING RADIUS SERVER ip to 10.28.3.100 Signed-off-by: jitendracandela * Added wpa personal and open bridge test cases for client scale test Signed-off-by: jitendracandela * Added Toggle Airplane Mode * Added toggle airplane mode test-cases (NAT, VLAN) Signed-off-by: karthikeyan * Added toggle airplane mode functionality in perfecto library Signed-off-by: karthikeyan * Changed teardown func placement in android tests to accomodate perfecto report Signed-off-by: haricharan-jaka * Refactored client-isolation test-cases Signed-off-by: tarun-candela * refactored multi-station performance test-cases Signed-off-by: tarun-candela * Added logic to setup_configuration_data() to support for multi-band combinations Signed-off-by: tarun-candela * allure attachments for client-isolation test_cases Signed-off-by: tarun-candela * [WIFI-11619] Fix: workflow dependencies Signed-off-by: Dmitry Dunaev * [WIFI-11619] Dbg: runtime user Signed-off-by: Dmitry Dunaev * [WIFI-11619] Chg: set files permissions Signed-off-by: Dmitry Dunaev * [WIFI-11619] Dbg: add step for status Signed-off-by: Dmitry Dunaev * Adjusted parameters in rate limiting for perfecto interop Signed-off-by: jitendracandela * [WIFI-11619] Add: git commit the changes Signed-off-by: Dmitry Dunaev * [WIFI-11619] Add: git commit the changes Signed-off-by: Dmitry Dunaev * [WIFI-11619] Add: git commit the changes Signed-off-by: Dmitry Dunaev * [WIFI-11619] Add: git commit the changes Signed-off-by: Dmitry Dunaev * [WIFI-11619] Add: git commit the changes Signed-off-by: Dmitry Dunaev * [WIFI-11619] Chg: GitHub Pages dir Signed-off-by: Dmitry Dunaev * [WIFI-11619] Chg: GitHub Pages dir Signed-off-by: Dmitry Dunaev * Added extra parameters in rate limiting test to accomodate lanforge testcases in Perfecto Interop Signed-off-by: haricharan-jaka * [WIFI-11619] Add: README note Signed-off-by: Dmitry Dunaev * Rectified ssid parameter in Perfecto Interop Signed-off-by: haricharan-jaka * Changed ssid to ssid_name in Interop rate limiting testcases Signed-off-by: haricharan-jaka * Removed execution number logic (NAT-LAN logic) for NAT mode ttls test cases Signed-off-by: jitendracandela * Refactored multi-asso-disasso Signed-off-by: karthikaeyetea * Revert "Added logic to setup_configuration_data() to support for multi-band combinations" This reverts commit cef8a233159f7c9ec8b1c90de70f2d1173b6bd0f. * Added try and except logic in push_config Signed-off-by: jitendracandela * Fixed Config sent from Gateway is Received by AP, But not Applied by AP issue and added AP logs during config fails Signed-off-by: jitendracandela * Removed resp is None logic Signed-off-by: jitendracandela * Added Interop sanity marker in connectivity tests Signed-off-by: haricharan-jaka * Updated nat mode & create_vlan parameter for Multi Station Performance test-cases Signed-off-by: tarun-candela * Added title, suite for multi-asso-disasso Signed-off-by: karthikaeyetea * Added table results for multi-station-performance test-cases Signed-off-by: tarun-candela * Updated Readme file in wlan-testing Signed-off-by: shivam * Added check_connectivity arg Signed-off-by: karthikaeyetea * Added title,suite for VLAN-multi-asso-disasso Signed-off-by: karthikaeyetea * Refactored rx_sens from rx_sensitivity test to TR-398 Issue 2 Signed-off-by: karthikaeyetea * Resolved conflicts in Lab_info.json Signed-off-by: haricharan-jaka * Added Open Passpoint required data in Configuration.py Signed-off-by: haricharan-jaka * Added Open roaming configuration Fixture Signed-off-by: haricharan-jaka * Added Open Roaming support code in Controller libs and tip_2x Signed-off-by: haricharan-jaka * Added sample testcase of open roaming for checking Signed-off-by: haricharan-jaka * Added Comments in Open roaming testcase Signed-off-by: haricharan-jaka * Modified upload_rate for wifi_capacity Signed-off-by: tarun-candela * Removed unnecessary Passpoint data Signed-off-by: haricharan-jaka * Removed unnecessary Passpoint data in configuration.py Signed-off-by: haricharan-jaka * Adding new Jira links and Descriptions Signed-off-by: Rajendra * added passpoint info to tunnel bash Signed-off-by: anil-tegala * created 5g tests for rxsens Signed-off-by: karthikaeyetea * Modified multi station performance udp_download test-cases for test result table Signed-off-by: tarun-candela * Deleted wifi_capacity_test Signed-off-by: jitendracandela * Added or removed performance marker for performance suite Signed-off-by: jitendracandela * Enhanced allure report for sanity Signed-off-by: jitendracandela * Added sanity test plans and markers Signed-off-by: jitendracandela * Removed unnecessary marker Signed-off-by: haricharan-jaka * Added Interop Testplan markers in testplan.md file Signed-off-by: haricharan-jaka * Removed emoji's from testplan file Signed-off-by: haricharan-jaka * Added emoji's from testplan file Signed-off-by: haricharan-jaka * Added some formatting in texts in testplan file Signed-off-by: haricharan-jaka * Removed some formatting in texts in testplan file Signed-off-by: haricharan-jaka * Added some formatting in texts in testplan file Signed-off-by: haricharan-jaka * Added jira links, description and markers for new sanity testcases Signed-off-by: anil-tegala * Added markers and description for some more of sanity suite testcases Signed-off-by: Jyothsna-setti * Added test plans md file in readme.md file Signed-off-by: haricharan-jaka * Added test plans md file in readme.md file Signed-off-by: haricharan-jaka * Changed marker expressions in Testplans.md file Signed-off-by: haricharan-jaka * Removed wrong duplicate parent_suite Signed-off-by: jitendracandela * Added test description Signed-off-by: jitendracandela * Removed unwanted marker and Added test description Signed-off-by: jitendracandela * Removed duplicate function name Signed-off-by: jitendracandela * Modified parent suite Signed-off-by: jitendracandela * Modified parent suite and feature name Signed-off-by: jitendracandela * modified mode of udaya AP from wifi6 to wifi5 Signed-off-by: anil-tegala * Logging response info for configuration push Signed-off-by: jitendracandela Signed-off-by: jitendracandela Signed-off-by: anil-tegala Signed-off-by: haricharan-jaka Signed-off-by: shivam Signed-off-by: karthikaeyetea Signed-off-by: Dmitry Dunaev Signed-off-by: tarun-candela Signed-off-by: karthikeyan Signed-off-by: Rajendra Signed-off-by: Jyothsna-setti Co-authored-by: tarun-candela Co-authored-by: anil-tegala Co-authored-by: haricharan-jaka Co-authored-by: shivam Co-authored-by: karthikaeyetea Co-authored-by: Dmitry Dunaev <83591011+dunaev-opsfleet@users.noreply.github.com> Co-authored-by: Dmitry Dunaev Co-authored-by: karthikeyan Co-authored-by: Rajendra Co-authored-by: Jyothsna-setti --- .../actions/build-and-push-docker/action.yml | 5 - .github/workflows/manual.yml | 10 +- .github/workflows/update-tests.yml | 22 +- README.md | 69 +- TEST_PLANS.md | 66 + docker/Dockerfile | 15 +- docker/README.md | 21 +- .../__init__.py => dut_lib_template/README.md | 0 dut_lib_template/SetupLibrary.py | 81 + .../__init__.py | 0 dut_lib_template/ap_lib.py | 176 + dut_lib_template/dut_lib_template.py | 520 ++ dut_lib_template/openwrt_ctl.py | 388 + dut_lib_template/schemacheck.py | 603 ++ dut_lib_template/setup.py | 21 + lanforge/TIP_README.txt | 10 - .../wifi_capacity_test => libs}/__init__.py | 0 libs/apnos/apnos.py | 1437 ++-- libs/apnos/openwrt_ctl.py | 752 +- libs/controller/controller_2x/controller.py | 10 +- libs/lanforge/README.md | 1 - libs/lanforge/lf_lib.py | 43 - libs/lanforge/lf_tools.py | 892 -- libs/lanforge/pull_report.py | 21 - libs/lanforge/scp_util.py | 55 - .../NetworkConnectivity.py | 29 + .../network_connectivity}/__init__.py | 0 .../README.md | 0 .../perfecto_interop}/__init__.py | 0 libs/perfecto_interop/android_libs.py | 3001 +++++++ libs/perfecto_interop/android_tests.py | 416 + .../ios_lib.py} | 213 +- libs/perfecto_interop/ios_libs.py | 1352 +++ libs/perfecto_interop/ios_tests.py | 387 + libs/perfecto_interop/perfecto_interop.py | 388 + libs/perfecto_interop/setup.py | 21 + libs/perfecto_libs/android_lib.py | 7565 ----------------- .../wpa_personal => libs/tip_1x}/__init__.py | 0 libs/tip_1x/controller.py | 1418 +++ .../__init__.py => libs/tip_2x/README.md | 0 libs/tip_2x/SetupLibrary.py | 81 + .../android => libs/tip_2x}/__init__.py | 0 libs/tip_2x/ap_lib.py | 537 ++ libs/tip_2x/controller.py | 2021 +++++ libs/tip_2x/openwrt_ctl.py | 388 + libs/tip_2x/schemacheck.py | 603 ++ libs/tip_2x/setup.py | 21 + libs/tip_2x/tip_2x.py | 1148 +++ setup_env.bash | 262 + setup_tunnel.bash | 1314 +++ sync_repos.bash | 13 - tests/configuration.py | 8 +- tests/conftest.py | 1217 +-- tests/controller_tests/test_api_login.py | 22 - .../ucentral_gateway/test_fms_service.py | 5 +- .../ucentral_gateway/test_gatewayservice.py | 182 +- .../ucentral_gateway/test_provisionservice.py | 483 +- .../ucentral_gateway/test_securityservice.py | 30 +- tests/e2e/UseCase/test_API_provision.py | 516 +- .../test_bridge_air_time_fairness.py | 12 +- tests/e2e/advanced/conftest.py | 150 +- .../open/test_bridge_mode.py | 4 +- .../open/test_nat_mode.py | 4 +- .../open/test_vlan_mode.py | 4 +- .../wpa2_personal/test_bridge_mode.py | 4 +- .../wpa2_personal/test_nat_mode.py | 4 +- .../wpa2_personal/test_vlan_mode.py | 4 +- .../wpa3_personal/test_bridge_mode.py | 4 +- .../wpa3_personal/test_nat_mode.py | 4 +- .../wpa3_personal/test_vlan_mode.py | 4 +- .../wpa_personal/test_bridge_mode.py | 4 +- .../wpa_personal/test_nat_mode.py | 4 +- .../wpa_personal/test_vlan_mode.py | 4 +- .../test_bridge_association_disassociation.py | 348 +- .../test_nat_association_disassociation.py | 347 +- .../test_vlan_association_disassociation.py | 305 +- .../test_bridge_multi_sta_performance.py | 1441 ++-- .../test_nat_multi_sta_performance.py | 1433 ++-- .../test_vlan_multi_sta_performance.py | 2146 +++-- .../wpa2_personal/test_bridge_orientation.py | 4 +- .../wpa2_personal/test_bridge_mode.py | 4 +- .../wpa2_personal/test_nat_mode.py | 4 +- .../wpa2_personal/test_vlan_mode.py | 14 +- .../test_bridge_mode_2g.py | 2248 +---- .../test_bridge_mode_5g.py | 84 +- .../test_bridge_mode_all_mcs.py | 8 +- .../test_bridge_rxsensitivity.py | 4 +- .../receiver_sensitivity/test_nat_mode.py | 84 +- .../receiver_sensitivity/test_nat_mode_2g.py | 84 +- .../test_nat_mode_all_mcs.py | 8 +- .../receiver_sensitivity/test_vlan_mode_2g.py | 84 +- .../receiver_sensitivity/test_vlan_mode_5g.py | 84 +- .../roam_test/hard_roam/OTA/test_roam_ota.py | 8 +- .../hard_roam/OTD/test_5g_roam_otd.py | 152 +- .../test_bridge_5g_to_5g.py | 328 +- .../test_bridge_single_client.py | 416 +- .../wpa2_personal/test_bridge_spatial.py | 44 +- tests/e2e/basic/README.md | 4 +- ...enterprise_security_modes_configuration.py | 72 +- ...st_general_security_modes_configuration.py | 80 +- ...enterprise_security_modes_configuration.py | 72 +- ...st_general_security_modes_configuration.py | 80 +- ...enterprise_security_modes_configuration.py | 72 +- ...st_general_security_modes_configuration.py | 80 +- tests/e2e/basic/conftest.1 | 152 + tests/e2e/basic/conftest.py | 162 +- .../dfs_20MHz/test_dfs_20_bridge.py | 804 +- .../dfs_40MHz/test_dfs_40_bridge.py | 911 +- .../dfs_80MHz/test_dfs_80_bridge.py | 938 +- .../bridge_mode/test_ap_stability.py | 4 +- .../wpa2_personal/test_bridge_mode.py | 8 +- .../wpa2_personal/test_nat_mode.py | 8 +- .../wpa2_personal/test_vlan_mode.py | 8 +- .../client_scale_test}/__init__.py | 0 .../client_scale_test/open}/__init__.py | 0 .../open/test_bridge_mode.py | 309 + .../client_scale_test/open/test_nat_mode.py} | 0 .../wpa2_personal}/__init__.py | 0 .../wpa2_personal/test_bridge_mode.py | 311 + .../wpa2_personal/test_nat_mode.py | 311 + .../wpa3_personal}/__init__.py | 0 .../wpa3_personal/test_bridge_mode.py | 449 + .../wpa_personal}/__init__.py | 0 .../wpa_personal/test_bridge_mode.py | 309 + .../open_security/test_bridge_mode.py | 103 +- .../open_security/test_nat_mode.py | 113 +- .../open_security/test_vlan_mode.py | 101 +- .../wpa2_security/test_bridge_mode.py | 175 +- .../wpa2_security/test_nat_mode.py | 188 +- .../wpa2_security/test_vlan_mode.py | 117 +- .../wpa3_security/test_bridge_mode.py | 137 +- .../wpa3_security/test_nat_mode.py | 147 +- .../wpa3_security/test_vlan_mode.py | 139 +- .../wpa_security/test_bridge_mode.py | 111 +- .../wpa_security/test_nat_mode.py | 120 +- .../wpa_security/test_vlan_mode.py | 107 +- .../open/test_bridge_mode.py | 6 +- .../open/test_nat_mode.py | 6 +- .../open/test_vlan_mode.py | 6 +- .../wap3_personal/test_bridge_mode.py | 6 +- .../wap3_personal/test_nat_mode.py | 6 +- .../wap3_personal/test_vlan_mode.py | 6 +- .../wpa2_personal/test_bridge_mode.py | 4 +- .../wpa2_personal/test_nat_mode.py | 4 +- .../wpa2_personal/test_vlan_mode.py | 6 +- .../wpa_personal/test_bridge_mode.py | 6 +- .../wpa_personal/test_nat_mode.py | 6 +- .../wpa_personal/test_vlan_mode.py | 6 +- .../bridge_mode/test_multi_sta_thpt_2g.py | 52 +- .../bridge_mode/test_mutli_sta_thpt_5g.py | 52 +- .../nat_mode/test_multi_sta_thpt_2g.py | 52 +- .../nat_mode/test_mutli_sta_thpt_5g.py | 52 +- .../vlan_mode/test_multi_sta_thpt_2g.py | 52 +- .../vlan_mode/test_mutli_sta_thpt_5g.py | 52 +- .../wpa2_personal/test_bridge_mode.py | 4 +- .../ofdma_test/wpa2_personal/test_nat_mode.py | 4 +- .../wpa2_personal/test_vlan_mode.py | 4 +- .../peak_throughput_tests}/__init__.py | 0 .../bridge_mode}/__init__.py | 0 .../wpa2_enterprise_encryption}/__init__.py | 0 .../test_peak_throughput_wpa2_eap_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_eap_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa2_eap_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_eap_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa2_eap_80Mhz_5g.py | 543 ++ .../wpa2_personal_encryption}/__init__.py | 0 .../test_peak_throughput_wpa2_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_20Mhz_5g.py | 2257 +++++ .../test_peak_throughput_wpa2_40Mhz_2g.py | 1488 ++++ .../test_peak_throughput_wpa2_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa2_80Mhz_5g.py | 553 ++ .../wpa3_enterprise_encryption}/__init__.py | 0 .../test_peak_throughput_wpa3_eap_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_eap_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa3_eap_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_eap_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa3_eap_80Mhz_5g.py | 543 ++ .../wpa3_personal_encryption}/__init__.py | 0 .../test_peak_throughput_wpa3_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa3_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa3_80Mhz_5g.py | 543 ++ .../bridge_mode/wpa_encryption}/__init__.py | 0 .../test_peak_throughput_wpa_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa_80Mhz_5g.py | 543 ++ .../nat_mode}/__init__.py | 0 .../wpa2_enterprise_encryption}/__init__.py | 0 .../test_peak_throughput_wpa2_eap_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_eap_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa2_eap_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_eap_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa2_eap_80Mhz_5g.py | 543 ++ .../wpa2_personal_encryption}/__init__.py | 0 .../test_peak_throughput_wpa2_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa2_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa2_40Mhz_2g.py | 1470 ++++ .../test_peak_throughput_wpa2_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa2_80Mhz_5g.py | 548 ++ .../wpa3_enterprise_encryption}/__init__.py | 0 .../test_peak_throughput_wpa3_eap_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_eap_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa3_eap_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_eap_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa3_eap_80Mhz_5g.py | 543 ++ .../wpa3_personal_encryption}/__init__.py | 0 .../test_peak_throughput_wpa3_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa3_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa3_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa3_80Mhz_5g.py | 543 ++ .../nat_mode/wpa_encryption}/__init__.py | 0 .../test_peak_throughput_wpa_20Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa_20Mhz_5g.py | 2258 +++++ .../test_peak_throughput_wpa_40Mhz_2g.py | 1465 ++++ .../test_peak_throughput_wpa_40Mhz_5g.py | 1175 +++ .../test_peak_throughput_wpa_80Mhz_5g.py | 543 ++ .../wpa2_personal/test_bridge_mode.py | 12 +- .../wpa2_personal/test_nat_mode.py | 12 +- .../wpa2_personal/test_vlan_mode.py | 12 +- .../test_bridge_mode.py | 17 +- .../test_nat_mode.py | 17 +- .../test_vlan_mode.py | 16 +- .../open_security/test_bridge_mode.py | 8 +- .../open_security/test_nat_mode.py | 8 +- .../open_security/test_vlan_mode.py | 8 +- .../wpa2_security/test_bridge_mode.py | 8 +- .../wpa2_security/test_nat_mode.py | 8 +- .../wpa2_security/test_vlan_mode.py | 8 +- .../wpa3_security/test_bridge_mode.py | 8 +- .../wpa3_security/test_nat_mode.py | 8 +- .../wpa3_security/test_vlan_mode.py | 8 +- .../wpa_security/test_bridge_mode.py | 8 +- .../wpa_security/test_nat_mode.py | 8 +- .../wpa_security/test_vlan_mode.py | 8 +- .../wifi_capacity_test/open/__init__.py | 1 - .../open/test_bridge_mode.py | 451 - .../wifi_capacity_test/open/test_nat_mode.py | 436 - .../wifi_capacity_test/open/test_vlan_mode.py | 436 - .../wpa2_personal/test_bridge_mode.py | 575 -- .../wpa2_personal/test_nat_mode.py | 575 -- .../wpa2_personal/test_vlan_mode.py | 388 - .../wpa3_personal/test_bridge_mode.py | 464 - .../wpa3_personal/test_nat_mode.py | 448 - .../wpa3_personal/test_vlan_mode.py | 435 - .../wpa_personal/test_bridge_mode.py | 461 - .../wpa_personal/test_nat_mode.py | 438 - .../wpa_personal/test_vlan_mode.py | 435 - tests/e2e/basic/test_access_point.py | 234 +- tests/e2e/basic/test_e2e_sdk_ap_tests.py | 410 +- tests/e2e/basic/test_firmware.py | 114 +- .../test_enterprise_tls.py | 345 +- .../test_enterprise_ttls.py | 275 +- .../test_general_security_modes.py | 492 +- .../wpa2_security/test_multipsk_basic_wpa2.py | 160 +- .../wpa_security/test_multipsk_basic_wpa.py | 173 +- .../rate_limiting/test_rate_limiting.py | 772 +- .../test_radius_limiting.py | 959 --- .../test_rate_limiting_with_radius.py | 1082 +++ .../client_isolation/test_client_isolation.py | 924 +- .../fiveg_band/test_CA_20Mhz_5g.py | 426 +- .../twog_band/test_CA_20Mhz_2g.py | 220 +- .../fiveg_band/test_CA_40Mhz_5g.py | 200 +- .../twog_band/test_CA_40Mhz_2g.py | 221 +- .../fiveg_band/test_CA_80Mhz_5g.py | 100 +- .../fiveg_band/test_GB_20Mhz_5g.py | 625 +- .../twog_band/test_GB_20Mhz_2g.py | 260 +- .../fiveg_band/test_GB_40Mhz_5g.py | 300 +- .../twog_band/test_GB_40Mhz_2g.py | 260 +- .../fiveg_band/test_GB_80Mhz_5g.py | 150 +- .../fiveg_band/test_IN_20Mhz_5g.py | 425 +- .../twog_band/test_IN_20Mhz_2g.py | 260 +- .../fiveg_band/test_IN_40Mhz_5g.py | 200 +- .../twog_band/test_IN_40Mhz_2g.py | 260 +- .../fiveg_band/test_IN_80Mhz_5g.py | 150 +- .../fiveg_band/test_JP_20Mhz_5g.py | 650 +- .../twog_band/test_JP_20Mhz_2g.py | 280 +- .../fiveg_band/test_JP_40Mhz_5g.py | 300 +- .../twog_band/test_JP_40Mhz_2g.py | 281 +- .../fiveg_band/test_JP_80Mhz_5g.py | 100 +- .../fiveg_band/test_RU_20Mhz_5g.py | 625 +- .../twog_band/test_RU_20Mhz_2g.py | 260 +- .../fiveg_band/test_RU_40Mhz_5g.py | 300 +- .../twog_band/test_RU_40Mhz_2g.py | 260 +- .../fiveg_band/test_RU_80Mhz_5g.py | 150 +- .../fiveg_band/test_SG_20Mhz_5g.py | 625 +- .../twog_band/test_SG_20Mhz_2g.py | 260 +- .../fiveg_band/test_SG_40Mhz_5g.py | 300 +- .../twog_band/test_SG_40Mhz_2g.py | 260 +- .../fiveg_band/test_SG_80Mhz_5g.py | 150 +- .../fiveg_band/test_US_20Mhz_5g.py | 987 ++- .../twog_band/test_US_20Mhz_2g.py | 220 +- .../fiveg_band/test_US_40Mhz_5g.py | 480 +- .../twog_band/test_US_40Mhz_2g.py | 220 +- .../fiveg_band/test_US_80Mhz_5g.py | 238 +- .../max_ssid/test_max_ssid.py | 24 +- .../test_enterprise_tls.py | 454 +- .../test_enterprise_ttls.py | 324 +- .../test_general_security_modes.py | 594 +- .../wpa2_security/test_multi_psk_nat_wpa2.py | 131 - .../wpa2_security/test_multipsk_basic_wpa2.py | 127 + .../wpa_security/test_multi_psk_nat_wpa.py | 128 - .../wpa_security/test_multipsk_basic_wpa.py | 127 + .../rate_limiting/test_rate_limiting.py | 825 +- .../test_enterprise_tls.py | 360 +- .../test_enterprise_ttls.py | 326 +- .../test_general_security_modes.py | 550 +- .../test_dynamic_over_ssid_fiveg_wpa2.py | 101 +- .../fiveg/test_dynamic_vlan_fiveg_wpa2.py | 680 +- .../twog/test_dynamic_over_ssid_twog_wpa2.py | 103 +- .../twog/test_dynamic_vlan_twog_wpa2.py | 680 +- .../test_dynamic_over_ssid_fiveg_wpa3.py | 98 +- .../fiveg/test_dynamic_vlan_fiveg_wpa3.py | 669 +- .../twog/test_dynamic_over_ssid_twog_wpa3.py | 96 +- .../twog/test_dynamic_vlan_twog_wpa3.py | 671 +- .../vlan_mode/fiveg_radio/test_vlan_fiveg.py | 379 - .../vlan_mode/multi_vlan}/__init__.py | 0 .../multi_vlan/test_multi_vlan_fiveg.py | 178 + .../multi_vlan/test_multi_vlan_twog.py | 178 + .../rate_limiting/test_rate_limiting.py | 812 +- .../vlan_mode/twog_radio/test_vlan_twog.py | 371 - tests/e2e/conftest.1 | 1014 +++ .../android/test_ExpressWifi_and.py | 68 - .../Express_WiFi/iOS/test_ExpressWifi_ios.py | 68 - tests/e2e/interOp/README.md | 50 - .../android/test_captive_portal_modes.py | 373 - .../nat_mode/ios/test_captive_portal_modes.py | 367 - tests/e2e/interOp/conftest.py | 755 +- .../openroaming_test/android/conftest.py | 390 - .../android/test_OpenRoaming_BridgeMode.py | 340 - .../interOp/openroaming_test/iOS/conftest.py | 391 - .../iOS/test_OpenRoaming_BridgeMode.py | 326 - .../iOS/test_OpenRoaming_NatMode.py | 356 - .../iOS/test_OpenRoaming_vlan_mode.py | 326 - .../test_openroaming_bridge.py | 52 + .../test_PassPointConnection_BridgeMode.py | 223 - .../test_PassPointConnection_BridgeMode.py | 235 - .../android/test_PassPointConnection.py | 223 - .../nat_mode/iOS/test_PassPointConnection.py | 235 - .../test_AccessPointConnection_BridgeMode.py | 224 - .../test_AccessPointConnection_BridgeMode.py | 247 - .../android/test_BridgeMode.py | 213 - .../android/test_enterprise_ttls.py | 491 -- .../android/test_general_security_modes.py | 571 -- .../iOS/test_enterprise_ttls.py | 503 -- .../iOS/test_general_security_modes.py | 558 -- .../test_enterprise_ttls.py | 330 + .../test_general_security_modes.py | 373 + .../android/test_enterprise_ttls.py | 300 - .../android/test_general_security_modes.py | 581 -- .../client_connectivity_test/iOS/__init__.py | 0 .../iOS/test_BridgeMode.py | 212 - .../iOS/test_enterprise_ttls.py | 309 - .../iOS/test_general_security_modes.py | 529 -- .../country_code_CA/__init__.py | 0 .../country_code_CA/android/test_CA_20Mhz.py | 1711 ---- .../country_code_CA/android/test_CA_40Mhz.py | 1148 --- .../country_code_CA/android/test_CA_80Mhz.py | 1020 --- .../country_code_CA/iOS/__init__.py | 0 .../country_code_CA/iOS/test_20MHZ.py | 1729 ---- .../country_code_CA/iOS/test_40mhz.py | 1166 --- .../country_code_CA/iOS/test_80mhz.py | 1028 --- .../country_code_GB/__init__.py | 0 .../country_code_GB/android/__init__.py | 0 .../country_code_GB/android/test_GB_20mhz.py | 1705 ---- .../country_code_GB/android/test_GB_40mhz.py | 1148 --- .../country_code_GB/android/test_GB_80mhz.py | 1019 --- .../country_code_GB/iOS/__init__.py | 0 .../country_code_GB/iOS/test_GB_20mhz.py | 1728 ---- .../country_code_GB/iOS/test_GB_40mhz.py | 1166 --- .../country_code_GB/iOS/test_GB_80mhz.py | 1028 --- .../country_code_IN/__init__.py | 0 .../country_code_IN/android/__init__.py | 0 .../country_code_IN/android/test_IN_20Mhz.py | 1707 ---- .../country_code_IN/android/test_IN_40Mhz.py | 1155 --- .../country_code_IN/android/test_IN_80Mhz.py | 1018 --- .../country_code_IN/iOS/__init__.py | 0 .../country_code_IN/iOS/test_IN_20mhz.py | 1729 ---- .../country_code_IN/iOS/test_IN_40mhz.py | 1166 --- .../country_code_IN/iOS/test_IN_80mhz.py | 1028 --- .../country_code_JP/__init__.py | 0 .../country_code_JP/android/test_JP_20Mhz.py | 1700 ---- .../country_code_JP/android/test_JP_40Mhz.py | 1151 --- .../country_code_JP/android/test_JP_80Mhz.py | 1019 --- .../country_code_JP/iOS/__init__.py | 0 .../country_code_JP/iOS/test_JP_20mhz.py | 1729 ---- .../country_code_JP/iOS/test_JP_40mhz.py | 1162 --- .../country_code_JP/iOS/test_JP_80mhz.py | 1025 --- .../country_code_RU/__init__.py | 0 .../country_code_RU/android/__init__.py | 0 .../country_code_RU/android/test_RU_20mhz.py | 1712 ---- .../country_code_RU/android/test_RU_40mhz.py | 1151 --- .../country_code_RU/android/test_RU_80mhz.py | 1019 --- .../country_code_RU/iOS/__init__.py | 0 .../country_code_RU/iOS/test_RU_20mhz.py | 1729 ---- .../country_code_RU/iOS/test_RU_40mhz.py | 1165 --- .../country_code_RU/iOS/test_RU_80mhz.py | 1028 --- .../country_code_SG/__init__.py | 0 .../country_code_SG/android/__init__.py | 0 .../country_code_SG/android/test_SG_20mhz.py | 1709 ---- .../country_code_SG/android/test_SG_40mhz.py | 1151 --- .../country_code_SG/android/test_SG_80mhz.py | 1019 --- .../country_code_SG/iOS/__init__.py | 0 .../country_code_SG/iOS/test_SG_20mhz.py | 1729 ---- .../country_code_SG/iOS/test_SG_40mhz.py | 1165 --- .../country_code_SG/iOS/test_SG_80mhz.py | 1028 --- .../country_code_US/__init__.py | 0 .../country_code_US/android/__init__.py | 0 .../country_code_US/android/test_US_20mhz.py | 1704 ---- .../country_code_US/android/test_US_40mhz.py | 1152 --- .../country_code_US/android/test_US_80mhz.py | 1019 --- .../country_code_US/iOS/__init__.py | 0 .../country_code_US/iOS/test_US_20mhz.py | 1730 ---- .../country_code_US/iOS/test_US_40mhz.py | 1167 --- .../country_code_US/iOS/test_US_80mhz.py | 1029 --- .../bridge_mode/multi_psk/__init__.py | 0 .../bridge_mode/multi_psk/android/__init__.py | 0 .../multi_psk/android/test_multipsk_wpa.py | 1809 ---- .../multi_psk/android/test_multipsk_wpa2.py | 1809 ---- .../multi_psk/android/test_multipsk_wpa3.py | 1801 ---- .../bridge_mode/multi_psk/iOS/__init__.py | 0 .../multi_psk/iOS/test_multipsk_wpa.py | 1804 ---- .../multi_psk/iOS/test_multipsk_wpa2.py | 1804 ---- .../multi_psk/iOS/test_multipsk_wpa3.py | 1804 ---- .../rate_limiting/android/__init__.py | 0 .../android/test_rate_limiting.py | 298 - .../bridge_mode/rate_limiting/iOS/__init__.py | 0 .../rate_limiting/iOS/test_rate_limiting.py | 300 - .../rate_limiting/test_rate_limiting.py | 247 + .../android/__init__.py | 0 .../test_ToggleAirplaneMode_BridgeMode.py | 209 - .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 630 -- .../toggle_airplane_mode_test/iOS/__init__.py | 0 .../iOS/test_ToggleAirplaneMode_BridgeMode.py | 239 - .../iOS/test_enterprise_ttls.py | 342 - .../iOS/test_general_securtiy_modes.py | 624 -- .../test_enterprise_ttls.py | 310 + .../test_general_security_modes.py | 328 + .../toggle_wifi_mode_test/android/__init__.py | 0 .../android/test_WifiMode_BridgeMode.py | 216 - .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 630 -- .../toggle_wifi_mode_test/iOS/__init__.py | 0 .../iOS/test_ToggleWifiMode_Bridge.py | 238 - .../iOS/test_enterprise_ttls.py | 343 - .../iOS/test_general_security_modes.py | 624 -- .../test_enterprise_ttls.py | 145 + .../test_general_security_modes.py | 254 + .../access_point_connection_test/__init__.py | 0 .../android/__init__.py | 0 .../android/test_AccessPointConnection.py | 217 - .../iOS/__init__.py | 0 .../iOS/test_AccessPointConnection.py | 239 - .../client_connect_test/android/__init__.py | 0 .../android/test_enterprise_ttls.py | 495 -- .../android/test_general_security_modes.py | 554 -- .../client_connect_test/iOS/__init__.py | 0 .../iOS/test_enterprise_ttls.py | 494 -- .../iOS/test_general_security_modes.py | 593 -- .../test_enterprise_ttls.py | 331 + .../test_general_security_modes.py | 367 + .../client_connectivity_test/__init__.py | 0 .../android/__init__.py | 0 .../android/test_NatMode.py | 235 - .../android/test_enterprise_ttls.py | 300 - .../android/test_general_security_modes.py | 580 -- .../client_connectivity_test/iOS/__init__.py | 0 .../iOS/test_NatMode.py | 210 - .../iOS/test_enterprise_ttls.py | 311 - .../iOS/test_general_security_modes.py | 527 -- .../rate_limiting/android/__init__.py | 0 .../android/test_rate_limiting.py | 298 - .../nat_mode/rate_limiting/iOS/__init__.py | 0 .../rate_limiting/iOS/test_rate_limiting.py | 299 - .../rate_limiting/test_rate_limiting.py | 245 + .../android/__init__.py | 0 .../android/test_ToggleAirplaneMode.py | 210 - .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 630 -- .../toggle_airplane_mode_test/iOS/__init__.py | 0 .../iOS/test_ToggleAirplaneMode.py | 240 - .../iOS/test_enterprise_ttls.py | 342 - .../iOS/test_general_security_modes.py | 626 -- .../test_enterprise_ttls.py | 308 + .../test_general_security_modes.py | 325 + .../toggle_wifi_mode_test/android/__init__.py | 0 .../android/test_ToggleWifiMode.py | 216 - .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 630 -- .../toggle_wifi_mode_test/iOS/__init__.py | 0 .../iOS/test_ToggleWifiMode.py | 238 - .../iOS/test_enterprise_ttls.py | 342 - .../iOS/test_general_security_modes.py | 626 -- .../test_enterprise_ttls.py | 144 + .../test_general_security_modes.py | 253 + .../client_connect_test/android/__init__.py | 0 .../android/test_enterprise_ttls.py | 501 -- .../android/test_general_security_modes.py | 552 -- .../client_connect_test/iOS/__init__.py | 0 .../iOS/test_enterprise_ttls.py | 501 -- .../iOS/test_general_security_mode.py | 548 -- .../test_enterprise_ttls.py | 331 + .../test_general_security_modes.py | 421 + .../client_connectivity_test/__init__.py | 0 .../android/__init__.py | 0 .../android/test_enterprise_ttls.py | 300 - .../android/test_general_security_modes.py | 560 -- .../client_connectivity_test/iOS/__init__.py | 0 .../iOS/test_enterprise_ttls.py | 309 - .../iOS/test_general_security_modes.py | 523 -- .../rate_limiting/android/__init__.py | 0 .../android/test_rate_limiting.py | 304 - .../vlan_mode/rate_limiting/iOS/__init__.py | 0 .../rate_limiting/iOS/test_rate_limiting.py | 306 - .../rate_limiting/test_rate_limiting.py | 251 + .../android/__init__.py | 0 .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 631 -- .../toggle_airplane_mode_test/iOS/__init__.py | 0 .../iOS/test_enterprise_ttls.py | 342 - .../iOS/test_general_security_modes.py | 623 -- .../test_enterprise_ttls.py | 308 + .../test_general_security_modes.py | 363 + .../toggle_wifi_mode_test/android/__init__.py | 0 .../android/test_enterprise_ttls.py | 332 - .../android/test_general_security_modes.py | 630 -- .../toggle_wifi_mode_test/iOS/__init__.py | 0 .../iOS/test_enterprise_ttls.py | 342 - .../iOS/test_general_security_modes.py | 625 -- .../test_enterprise_ttls.py | 143 + .../test_general_security_modes.py | 252 + tests/e2e/mesh/Mesh/test_mesh_bridge.py | 28 +- tests/e2e/mesh/Mesh/test_node_patterns.py | 108 +- tests/e2e/mesh/conftest.py | 320 +- tests/fixtures_1x.py | 663 -- tests/fixtures_2x.py | 1186 --- tests/fixtures_3x.py | 400 - tests/lab_info.json | 1448 +--- tests/pyproject.toml | 7 + tests/pytest.ini | 37 - tests/setup.cfg | 7 + tests/test_connectivity.py | 294 +- tests/tox.ini | 7 + tools/interop_reboot_devices_thread.py | 2 +- tools/interop_tools.py | 2 +- 549 files changed, 116267 insertions(+), 140558 deletions(-) create mode 100644 TEST_PLANS.md rename libs/lanforge/__init__.py => dut_lib_template/README.md (100%) create mode 100644 dut_lib_template/SetupLibrary.py rename {libs/perfecto_libs => dut_lib_template}/__init__.py (100%) create mode 100644 dut_lib_template/ap_lib.py create mode 100644 dut_lib_template/dut_lib_template.py create mode 100755 dut_lib_template/openwrt_ctl.py create mode 100644 dut_lib_template/schemacheck.py create mode 100644 dut_lib_template/setup.py delete mode 100644 lanforge/TIP_README.txt rename {tests/e2e/basic/performance_tests/wifi_capacity_test => libs}/__init__.py (100%) delete mode 100644 libs/lanforge/README.md delete mode 100644 libs/lanforge/lf_lib.py delete mode 100755 libs/lanforge/lf_tools.py delete mode 100644 libs/lanforge/pull_report.py delete mode 100755 libs/lanforge/scp_util.py create mode 100644 libs/network_connectivity/NetworkConnectivity.py rename {tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal => libs/network_connectivity}/__init__.py (100%) rename libs/{perfecto_libs => perfecto_interop}/README.md (100%) rename {tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal => libs/perfecto_interop}/__init__.py (100%) create mode 100644 libs/perfecto_interop/android_libs.py create mode 100644 libs/perfecto_interop/android_tests.py rename libs/{perfecto_libs/iOS_lib.py => perfecto_interop/ios_lib.py} (96%) create mode 100644 libs/perfecto_interop/ios_libs.py create mode 100644 libs/perfecto_interop/ios_tests.py create mode 100644 libs/perfecto_interop/perfecto_interop.py create mode 100644 libs/perfecto_interop/setup.py delete mode 100644 libs/perfecto_libs/android_lib.py rename {tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal => libs/tip_1x}/__init__.py (100%) create mode 100644 libs/tip_1x/controller.py rename tests/e2e/interOp/Express_WiFi/__init__.py => libs/tip_2x/README.md (100%) create mode 100644 libs/tip_2x/SetupLibrary.py rename {tests/e2e/interOp/Express_WiFi/android => libs/tip_2x}/__init__.py (100%) create mode 100644 libs/tip_2x/ap_lib.py create mode 100644 libs/tip_2x/controller.py create mode 100755 libs/tip_2x/openwrt_ctl.py create mode 100644 libs/tip_2x/schemacheck.py create mode 100644 libs/tip_2x/setup.py create mode 100644 libs/tip_2x/tip_2x.py create mode 100755 setup_env.bash create mode 100644 setup_tunnel.bash delete mode 100755 sync_repos.bash delete mode 100644 tests/controller_tests/test_api_login.py create mode 100644 tests/e2e/basic/conftest.1 rename tests/e2e/{interOp/Express_WiFi/iOS => basic/performance_tests/client_scale_test}/__init__.py (100%) rename tests/e2e/{interOp/captive_portal => basic/performance_tests/client_scale_test/open}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/client_scale_test/open/test_bridge_mode.py rename tests/e2e/{interOp/captive_portal/nat_mode/__init__.py => basic/performance_tests/client_scale_test/open/test_nat_mode.py} (100%) rename tests/e2e/{interOp/captive_portal/nat_mode/android => basic/performance_tests/client_scale_test/wpa2_personal}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_bridge_mode.py create mode 100644 tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_nat_mode.py rename tests/e2e/{interOp/captive_portal/nat_mode/ios => basic/performance_tests/client_scale_test/wpa3_personal}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/test_bridge_mode.py rename tests/e2e/{interOp/openroaming_test/android => basic/performance_tests/client_scale_test/wpa_personal}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/test_bridge_mode.py rename tests/e2e/{interOp/openroaming_test/iOS => basic/performance_tests/peak_throughput_tests}/__init__.py (100%) rename tests/e2e/{interOp/passpoint_connection_test => basic/performance_tests/peak_throughput_tests/bridge_mode}/__init__.py (100%) rename tests/e2e/{interOp/passpoint_connection_test/bridge_mode => basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py rename tests/e2e/{interOp/passpoint_connection_test/bridge_mode/android => basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py rename tests/e2e/{interOp/passpoint_connection_test/bridge_mode/iOS => basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py rename tests/e2e/{interOp/passpoint_connection_test/nat_mode => basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py rename tests/e2e/{interOp/passpoint_connection_test/nat_mode/android => basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py rename tests/e2e/{interOp/passpoint_connection_test/nat_mode/iOS => basic/performance_tests/peak_throughput_tests/nat_mode}/__init__.py (100%) rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test => basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android => basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS => basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android => basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS => basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption}/__init__.py (100%) create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py create mode 100644 tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/open/__init__.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_bridge_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_nat_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_vlan_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_bridge_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_nat_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_vlan_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_bridge_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_nat_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_vlan_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_bridge_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_nat_mode.py delete mode 100644 tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_vlan_mode.py delete mode 100644 tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py create mode 100644 tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_rate_limiting_with_radius.py delete mode 100644 tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multi_psk_nat_wpa2.py create mode 100644 tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py delete mode 100644 tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multi_psk_nat_wpa.py create mode 100644 tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py delete mode 100644 tests/e2e/basic/validation_of_operating_modes/vlan_mode/fiveg_radio/test_vlan_fiveg.py rename tests/e2e/{interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android => basic/validation_of_operating_modes/vlan_mode/multi_vlan}/__init__.py (100%) create mode 100644 tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_fiveg.py create mode 100644 tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_twog.py delete mode 100644 tests/e2e/basic/validation_of_operating_modes/vlan_mode/twog_radio/test_vlan_twog.py create mode 100644 tests/e2e/conftest.1 delete mode 100644 tests/e2e/interOp/Express_WiFi/android/test_ExpressWifi_and.py delete mode 100644 tests/e2e/interOp/Express_WiFi/iOS/test_ExpressWifi_ios.py delete mode 100644 tests/e2e/interOp/README.md delete mode 100644 tests/e2e/interOp/captive_portal/nat_mode/android/test_captive_portal_modes.py delete mode 100644 tests/e2e/interOp/captive_portal/nat_mode/ios/test_captive_portal_modes.py delete mode 100644 tests/e2e/interOp/openroaming_test/android/conftest.py delete mode 100644 tests/e2e/interOp/openroaming_test/android/test_OpenRoaming_BridgeMode.py delete mode 100644 tests/e2e/interOp/openroaming_test/iOS/conftest.py delete mode 100644 tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_BridgeMode.py delete mode 100644 tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_NatMode.py delete mode 100644 tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_vlan_mode.py create mode 100644 tests/e2e/interOp/openroaming_test/test_openroaming_bridge.py delete mode 100644 tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/test_PassPointConnection_BridgeMode.py delete mode 100644 tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/test_PassPointConnection_BridgeMode.py delete mode 100644 tests/e2e/interOp/passpoint_connection_test/nat_mode/android/test_PassPointConnection.py delete mode 100644 tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/test_PassPointConnection.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/test_AccessPointConnection_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/test_AccessPointConnection_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_40Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_80Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_20MHZ.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_20Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_40Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_80Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_20Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_40Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_80Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa2.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa3.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa2.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa3.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/test_rate_limiting.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/test_AccessPointConnection.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/test_AccessPointConnection.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_NatMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_NatMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/test_rate_limiting.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_ToggleWifiMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/test_rate_limiting.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_general_security_modes.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/__init__.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_enterprise_ttls.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_general_security_modes.py delete mode 100644 tests/fixtures_1x.py delete mode 100644 tests/fixtures_2x.py delete mode 100644 tests/fixtures_3x.py create mode 100644 tests/pyproject.toml delete mode 100644 tests/pytest.ini create mode 100644 tests/setup.cfg create mode 100644 tests/tox.ini diff --git a/.github/actions/build-and-push-docker/action.yml b/.github/actions/build-and-push-docker/action.yml index bbfcee8ad..9eab94795 100644 --- a/.github/actions/build-and-push-docker/action.yml +++ b/.github/actions/build-and-push-docker/action.yml @@ -26,11 +26,6 @@ runs: path: wlan-lanforge-scripts repository: Telecominfraproject/wlan-lanforge-scripts - - name: import LANforge scripts - shell: bash - working-directory: wlan-testing - run: ./sync_repos.bash - - name: docker login shell: bash run: docker login ${{ inputs.registry }} -u ${{ inputs.registry_user }} -p ${{ inputs.registry_password }} diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index ded2946fd..89a65cd84 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -89,13 +89,21 @@ jobs: echo "In order to get logs, open the link above and press 'View logs' button in top right corner" echo "If you want to get logs auto-updated, choose this option in dropdown menu hidden behind three dots in top right corner of logs viewer" + - name: tests env info + run: | + export NAMESPACE=manual-${{ github.run_id }}-${{ github.event.inputs.testbed }} + echo "Namespace name - $NAMESPACE" + echo "Link to related job in Kubernetes dashboard - https://k8s-dashboard.lab.wlan.tip.build/#/job/$NAMESPACE/testing?namespace=$NAMESPACE" + echo "In order to get logs, open the link above and press 'View logs' button in top right corner" + echo "If you want to get logs auto-updated, choose this option in dropdown menu hidden behind three dots in top right corner of logs viewer" + - name: run tests uses: ./.github/actions/run-tests with: namespace: "manual-${{ github.run_id }}-${{ github.event.inputs.testbed }}" testbed: "${{ github.event.inputs.testbed }}" marker_expression: "${{ github.event.inputs.marker_expression }}" - configuration: "${{ secrets.LAB_CONFIGURATION_JSON }}" + configuration: "${{ secrets.LAB_INFO_JSON }}" testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }} additional_args: "-o firmware=${{ github.event.inputs.firmware }} ${{ github.event.inputs.additional_args }}" allure_results_artifact_name: allure-results diff --git a/.github/workflows/update-tests.yml b/.github/workflows/update-tests.yml index 619508a2c..a1e20ff40 100644 --- a/.github/workflows/update-tests.yml +++ b/.github/workflows/update-tests.yml @@ -31,19 +31,37 @@ jobs: - uses: actions/checkout@v3 - name: Generate tests as allure results - run: docker run -v $PWD/allure-results:/allure-results tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }} -c "cd tests; pytest -s -vvv --alluredir=/allure-results --skip-all" + run: | + docker run -v $PWD/allure-results:/allure-results tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }} -c "cd tests; pytest -s -vvv --alluredir=/allure-results --skip-all" + sudo chown runner:docker -R $PWD/allure-results - name: Generate Allure report uses: ./.github/actions/generate-allure-report with: results_path: ./allure-results + - name: Update allure report + run: | + mv allure-report tmp-docs + rm -rf allure-* + mkdir -p ~/.ssh + ssh-keyscan -H github.com >> ~/.ssh/known_hosts + echo https://tip-automation:${{ secrets.GIT_PUSH_PAT }}@github.com > ~/.git-credentials + git config --global credential.helper store + git config --global user.email "tip-automation@telecominfraproject.com" + git config --global user.name "TIP Automation User" + git pull + git checkout gh-pages || git checkout -b gh-pages + mv tmp-docs docs + git add docs + git commit -m'Update allure report for github pages' + - name: Publish Allure report to GitHub Pages uses: ad-m/github-push-action@v0.6.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages - directory: ./allure-report + directory: ./docs cleanup: needs: [build, testsgen] diff --git a/README.md b/README.md index 17d6cce2e..b7a349ac2 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ This test automation tied into our overall tooling at TIP as shown below: ![Tools and Test Automation](.img/Tools_and_Testing.png) +You can get the full list of tests on [GitHub Pages](https://telecominfraproject.github.io/wlan-testing/) that's updated automatically. + ### General guidelines This testing code adheres to generic [pep8](https://www.python.org/dev/peps/pep-0008/#introduction) style guidelines, most notably: @@ -128,32 +130,67 @@ All code must be written in python 3 and conform to PEP 8 style guide. The test cd ~/ mkdir automation cd automation -git clone https://github.com/Telecominfraproject/wlan-testing -git clone https://github.com/Telecominfraproject/wlan-lanforge-scripts -cd wlan-testing -./sync_repos.bash -mkdir ~/.pip -echo "[global]" > ~/.pip/pip.conf -echo "index-url = https://pypi.org/simple" >> ~/.pip/pip.conf -echo "extra-index-url = https://tip-read:tip-read@tip.jfrog.io/artifactory/api/pypi/tip-wlan-python-pypi-local/simple" >> ~/.pip/pip.conf -pip3 install -r requirements.txt -cd tests -vim configuration.py # Setup your testbed data info here +git clone https://github.com/Telecominfraproject/wlan-testing +cd wlan-testing/ -# Check if everything is good -pytest --collect-only +cd tests/ +vim lab_info.json # Setup your testbed data info here +docker build -f docker/Dockerfile -t wlantest . +docker run -i -t -v $(YOUR_ALLURE_RESULT_DIR):/allure-results wlantest -c “cd tests;pytest -m ‘marker’ -s -vvv –testbed=basic-testbed –alluredir=allure-results” +# Check List of Available Tests +https://telecominfraproject.github.io/wlan-testing/ + +# Test Suites Marker +ow_sanity_lf: OpenWifi Sanity Test Plan + + + +# List of Available Markers + +client_connectivity_tests: Client Connectivity Test Cases with bridge|nat|vlan modes across 2.4|5|6 GHz bands with Various Encryptions +dfs_tests: Dynamic Frequency Selection Test Cases +multi_psk_tests: Multi PSK Test Cases +rate_limiting_tests: Rate Limiting Test Cases +dvlan_tests: Dynamic VLAN Test Cases +dynamic_qos_tests: Dynamic QOS Test Cases +multi_vlan_tests: Multi VLAN Combination based Test Cases +client_scale_tests: Client Capacity Tests with maximum possible Stations bridge|nat|vlan 2.4|5|6 GHz Bands +peak_throughput_tests: Single Client Peak Performance Test with various Bandwidths across 2.4|5|6 GHz Bands with various Client Types +dataplane_tests: Single Client Throughput Test with various pkt sizes with UL|DL|BI with AC|AX Client Types across 2.4|5|6 GHz Bands +country_code: Country Code Test Cases + +# Supported Modes, Bands, Encryptions +bridge: Use this marker to run bridge mode tests in each of the above test plans/suites +nat: Use this marker to run nat mode tests in each of the above test plans/suites +vlan: Use this marker to run vlan mode tests in each of the above test plans/suites + +twog: Use this marker to run 2.4 GHz tests in each of the above test plans/suites +fiveg: Use this marker to run 5 GHz tests in each of the above test plans/suites +sixg: Use this marker to run 6 GHz tests in each of the above test plans/suites + +open: Use this marker to run open Encryption tests in each of the above test plans/suites +wpa: Use this marker to run wpa Encryption tests in each of the above test plans/suites +wpa2_personal: Use this marker to run wpa2_personal Encryption tests in each of the above test plans/suites +wpa3_personal: Use this marker to run wpa3_personal Encryption tests in each of the above test plans/suites +wpa3_personal_mixed: Use this marker to run wpa3_personal_mixed Encryption tests in each of the above test plans/suites +wpa_wpa2_personal_mixed: Use this marker to run wpa_wpa2_personal_mixed Encryption tests in each of the above test plans/suites + +wpa_enterprise: Use this marker to run wpa_enterprise Encryption tests in each of the above test plans/suites +wpa2_enterprise: Use this marker to run wpa2_enterprise Encryption tests in each of the above test plans/suites +wpa3_enterprise: Use this marker to run wpa3_enterprise Encryption tests in each of the above test plans/suites +wpa_wpa2_enterprise_mixed: Use this marker to run wpa_wpa2_enterprise_mixed Encryption tests in each of the above test plans/suites +wpa3_enterprise_mixed: Use this marker to run wpa3_enterprise_mixed Encryption tests in each of the above test plans/suites + # for visualizing allure reports, Install nodejs # Set Java home # install allure command npm install -g allure-commandline --save-dev - ``` - - +### [Test Plans and Markers](TEST_PLANS.md):bookmark_tabs: ### Executing and Contributing new test cases Follow instructions provided [here](./tests/README.md) to understand the Testing Framework, and How to run and diff --git a/TEST_PLANS.md b/TEST_PLANS.md new file mode 100644 index 000000000..c1c233b1c --- /dev/null +++ b/TEST_PLANS.md @@ -0,0 +1,66 @@ +## Test Plans and Markers associated with them are provided in this file :ledger: + +:speaking_head: SANITY + + 1. Client Connectivity Tests + client_connectivity_tests and tls and bridge + client_connectivity_tests and ttls and nat + client_connectivity_tests and general and vlan + 2. DFS Test + dfs_tests and wpa2_personal and bandwidth_80MHz + 3. Dynamic Vlan Test + dynamic_vlan_tests and wpa2_enterprise and dynamic_precedence_over_ssid or absence_of_radius_vlan_identifier and wpa2_enterprise + 4. MULTI VLAN Test + multi_vlan_tests and wpa2_personal or multi_vlan_tests and wpa + 5. Rate Limiting Tests + rate_limiting_tests and upload_download and batch_size_125 and twog + 6. Rate Limiting With Radius Test + rate_limiting_with_radius_tests and twog_upload_per_ssid or twog_download_perssid_persta + 7. MultiPsk Test + multi_psk_tests + 8. Throughput Benchmark Test + peak_throughput_tests and channel_11 and tcp_download and bridge and twog and channel_width_40 and wpa2_personal or peak_throughput_tests and channel_36 and tcp_download and bridge and fiveg and channel_width_80 and wpa2_personal + 9. Test Connectivity + test_resources + 10. SDK Tests + ow_sanity_lf and ow_sdk_tests + + +:speaking_head: INTEROP + + 1. Client Connect Tests + client_connect_tests and general and bridge + client_connect_tests and general and nat + client_connect_tests and general and vlan + client_connect_tests and enterprise and bridge + client_connect_tests and enterprise and nat + client_connect_tests and enterprise and vlan + 2. Client Connectivity Tests + client_connectivity_tests and general and bridge + client_connectivity_tests and general and nat + client_connectivity_tests and general and vlan + client_connectivity_tests and enterprise and bridge + client_connectivity_tests and enterprise and nat + client_connectivity_tests and enterprise and vlan + 3. Rate Limiting Tests + rate_limiting_tests and bridge + rate_limiting_tests and nat + rate_limiting_tests and vlan + 4. Toggle Airplane mode Tests (Client Reconnect Tests) + toggle_airplane_tests and general and bridge + toggle_airplane_tests and general and nat + toggle_airplane_tests and general and vlan + toggle_airplane_tests and enterprise and bridge + toggle_airplane_tests and enterprise and nat + toggle_airplane_tests and enterprise and vlan + 5. Toggle Wifi mode Tests (Client Reconnect Tests) + toggle_wifi_mode and general and bridge + toggle_wifi_mode and general and nat + toggle_wifi_mode and general and vlan + toggle_wifi_mode and enterprise and bridge + toggle_wifi_mode and enterprise and nat + toggle_wifi_mode and enterprise and vlan + + + +More Markers related to other test plans will be added soon in the future \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index b7798abd0..a789e1404 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,8 @@ FROM python:3.8 +# Version of cloudsdk to be tested +ARG CLOUDSDK_LIBRARY=tip_2x +ARG TEST_DEVICE_NAME=all + RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ tshark \ && rm -rf /var/lib/apt/lists/* @@ -6,10 +10,13 @@ RUN mkdir ~/.pip RUN echo "[global]" > ~/.pip/pip.conf RUN echo "index-url = https://pypi.org/simple" >> ~/.pip/pip.conf RUN echo "extra-index-url = https://tip.jfrog.io/artifactory/api/pypi/tip-wlan-python-pypi-local/simple/" >> ~/.pip/pip.conf -COPY requirements.txt requirements.txt -RUN pip3 install -r requirements.txt -COPY lanforge /wlan-testing/lanforge +COPY requirements.txt /wlan-testing/requirements.txt +RUN pip3 install -r /wlan-testing/requirements.txt COPY tests /wlan-testing/tests COPY libs /wlan-testing/libs +COPY setup_env.bash /wlan-testing/setup_env.bash +ENV PYTHON=/usr/local/bin/python3 +ENV PIP=/usr/local/bin/pip3 +RUN /wlan-testing/setup_env.bash -t $CLOUDSDK_LIBRARY -d $TEST_DEVICE_NAME -n "TIP Automation" -o TIP -e tip-automation@telecominfraproject.com -i "TIP OpenWIFI Library" && pip3 freeze WORKDIR /wlan-testing -ENTRYPOINT ["bash"] +ENTRYPOINT ["/bin/bash"] diff --git a/docker/README.md b/docker/README.md index 1b754a33e..e9636e53f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,11 +3,28 @@ ### Building a docker image From the root directory of this repository (wlan-testing) run the following command: + ```bash docker build -f ./docker/Dockerfile -t wlantest . ``` + This will produce a docker image, which you can verify by running docker images command. +By default image will run [setup_env.bash](../setup_env.bash) that will install all required dependencies for tests against all supported devices and version 2 of Cloud SDK (see https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/ for details). + +If you want to modify this logic, you may pass different build arguments to the build. Supported arguments: + +- CLOUDSDK_LIBRARY - Cloud SDK library that should be used for tests (by default `tip_2x` will be used); +- TEST_DEVICE_NAME - device type that should be installed as a depencency (by default `all` will be used). + +Check [setup_env.bash](../setup_env.bash) for more details on supported parameters. + +Example on how to pass build arguments: + +```bash +docker build -f ./docker/Dockerfile -t wlantest --build-arg TEST_DEVICE_NAME=lanforge . +``` + ### Running a docker image From the root directory of this repository (wlan-testing) run the following command. This command executes @@ -15,5 +32,5 @@ connectivity tests on a specific lab. **NOTE:** Use appropriate marker for your configuration.py and replace ${YOUR_ALLURE_RESULTS_DIR} with your allure result dir. ```bash -docker run -i -t -v $(YOUR_ALLURE_RESULT_DIR):/allure-results -v $(pwd)/configuration.py:/wlan-testing/configuration.py wlantest /bin/bash -c "cd tests; pytest -s -vvv --testbed=basic-02 -m client_connectivity_test --skip-testrail --alluredir=/allure-result" -``` \ No newline at end of file +docker run -i -t -v $(YOUR_ALLURE_RESULT_DIR):/allure-results -v $(pwd)/configuration.py:/wlan-testing/configuration.py wlantest -c "cd tests; pytest -s -vvv --testbed=basic-02 -m client_connectivity_test --skip-testrail --alluredir=/allure-result" +``` diff --git a/libs/lanforge/__init__.py b/dut_lib_template/README.md similarity index 100% rename from libs/lanforge/__init__.py rename to dut_lib_template/README.md diff --git a/dut_lib_template/SetupLibrary.py b/dut_lib_template/SetupLibrary.py new file mode 100644 index 000000000..c3b75ecef --- /dev/null +++ b/dut_lib_template/SetupLibrary.py @@ -0,0 +1,81 @@ +import logging + +import paramiko +from scp import SCPClient + +logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) + + +class SetupLibrary: + + def __init__(self, remote_ip="", + remote_ssh_port=22, + remote_ssh_username="lanforge", + remote_ssh_password="lanforge", + pwd="", + ): + self.pwd = pwd + self.remote_ip = remote_ip + self.remote_ssh_username = remote_ssh_username + self.remote_ssh_password = remote_ssh_password + self.remote_ssh_port = remote_ssh_port + + def setup_serial_environment(self): + client = self.ssh_cli_connect() + cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read()) + if output.__contains__("False"): + cmd = 'mkdir ~/cicd-git/' + client.exec_command(cmd) + cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read()) + if output.__contains__("False"): + logging.info("Copying openwrt_ctl serial control Script...") + with SCPClient(client.get_transport()) as scp: + scp.put(self.pwd + 'openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py') # Copy my_file.txt to the server + cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + var = str(stdout.read()) + client.close() + + def ssh_cli_connect(self): + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + logging.info("Trying SSH Connection to: " + str(self.remote_ip) + + " on port: " + str(self.remote_ssh_port) + + " with username: " + str(self.remote_ssh_username) + + " and password: " + str(self.remote_ssh_password)) + client.connect(self.remote_ip, username=self.remote_ssh_username, password=self.remote_ssh_password, + port=self.remote_ssh_port, timeout=10, allow_agent=False, banner_timeout=200) + return client + + def check_serial_connection(self, tty="/dev/ttyUSB0"): + client = self.ssh_cli_connect() + cmd = 'ls /dev/tty*' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read().decode('utf-8')) + client.close() + available_tty_ports = output.split("\n") + if tty in available_tty_ports: + logging.info("Expected Serial Console Port, " + tty + " is available on " + self.remote_ip) + else: + logging.error("Expected Serial Console Port, " + tty + " is not available on " + self.remote_ip) + return tty in available_tty_ports + + def kill_all_minicom_process(self, tty="/dev/ttyUSB0"): + client = self.ssh_cli_connect() + stdin, stdout, stderr = client.exec_command("fuser -k " + tty) + # print(stdout.read()) + client.close() + + +if __name__ == '__main__': + obj = SetupLibrary(remote_ip="192.168.52.89", + remote_ssh_port=22, + pwd="") + + obj.setup_serial_environment() + obj.check_serial_connection(tty="/dev/ttyUSB0") + obj.kill_all_minicom_process(tty="/dev/ttyUSB0") diff --git a/libs/perfecto_libs/__init__.py b/dut_lib_template/__init__.py similarity index 100% rename from libs/perfecto_libs/__init__.py rename to dut_lib_template/__init__.py diff --git a/dut_lib_template/ap_lib.py b/dut_lib_template/ap_lib.py new file mode 100644 index 000000000..d9585673e --- /dev/null +++ b/dut_lib_template/ap_lib.py @@ -0,0 +1,176 @@ +import importlib +import json +import logging + +import allure +import paramiko +import pytest + +setup_lib = importlib.import_module("SetupLibrary") +SetupLibrary = setup_lib.SetupLibrary + + +class APLIBS: + setup_library_objects = list() + device_under_tests_data = None + + def __init__(self, dut_data=None): + if dut_data is None: + logging.error("Device Under Test Data is Not Specified, Please provide valid DUT Data") + pytest.exit("Device Under Test Data is Not Specified, Please provide valid DUT Data") + if type(dut_data) is not list: + logging.error("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format") + pytest.exit("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format") + self.device_under_tests_data = dut_data + for dut in self.device_under_tests_data: + self.setup_library_objects.append(SetupLibrary(remote_ip=dut["host_ip"], + remote_ssh_port=dut["host_ssh_port"], + remote_ssh_username=dut["host_username"], + remote_ssh_password=dut["host_password"], + pwd="")) + + def ssh_cli_connect(self, ip="", + port=22, + username="", + password="", + timeout=10, + allow_agent=False, + banner_timeout=200): + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + client.connect(ip, username=username, password=password, + port=port, timeout=timeout, allow_agent=allow_agent, banner_timeout=banner_timeout) + return client + + def run_generic_command(self, cmd="", idx=0, print_log=True, attach_allure=False, + expected_attachment_type=allure.attachment_type.TEXT): + input_command = cmd + logging.info("Executing Command on AP: " + cmd) + try: + self.setup_library_objects[idx].kill_all_minicom_process( + tty=self.device_under_tests_data[idx]["serial_tty"]) + client = self.ssh_cli_connect(ip=self.device_under_tests_data[idx]["host_ip"], + port=self.device_under_tests_data[idx]["host_ssh_port"], + username=self.device_under_tests_data[idx]["host_username"], + password=self.device_under_tests_data[idx]["host_password"], + timeout=10, + allow_agent=False, + banner_timeout=200) + if self.device_under_tests_data[idx]["method"] == "serial": + owrt_args = "--prompt root@" + self.device_under_tests_data[idx][ + "identifier"] + " -s serial --log stdout --user root --passwd openwifi" + cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {owrt_args} -t {self.device_under_tests_data[idx]['serial_tty']} --action " \ + f"cmd --value \"{cmd}\" " + if print_log: + logging.info(cmd) + stdin, stdout, stderr = client.exec_command(cmd) + output = stdout.read() + final_output = str(output) + if not output.__contains__(b"BOOTLOADER-CONSOLE-IPQ6018#"): + status = output.decode('utf-8').splitlines() + status.pop(0) + final_output = '\n'.join(status) + if print_log: + logging.info(cmd) + logging.info("Output for command: " + input_command + "\n" + final_output) + if attach_allure: + allure.attach(name=input_command, body=output, attachment_type=expected_attachment_type) + client.close() + except Exception as e: + logging.error(e) + final_output = "Error: " + str(e) + return final_output + + def example_function(self, idx=0, print_log=True, attach_allure=True): + output = self.run_generic_command(cmd="example_command", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + return output + + + + + +if __name__ == '__main__': + basic_05 = { + "target": "dut_lib_template", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf188n", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": None, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "0000c1018812", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 8842, + "serial_tty": "/dev/ttyAP1", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": 8840, + "ssh_port": 8841, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth1": { + "addressing": "static", + "ip": "10.28.2.16", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.NOTSET) + obj = APLIBS(dut_data=basic_05["device_under_tests"]) + # obj.exit_from_uboot() + # obj.setup_serial_environment() + + # obj.verify_certificates() + # obj.get_dut_logs() + # l = obj.get_latest_config_recieved() + # a = obj.get_active_config() + # if a == l: + # print("a = l") + # print(obj.get_ap_version()) diff --git a/dut_lib_template/dut_lib_template.py b/dut_lib_template/dut_lib_template.py new file mode 100644 index 000000000..16780f414 --- /dev/null +++ b/dut_lib_template/dut_lib_template.py @@ -0,0 +1,520 @@ +""" + Telecom Infra Project OpenWifi 2.X (Ucentral libraries for Test Automation) + + +""" +import importlib +import json +import random +import string +import time + +import allure +import pytest +import requests + +logging = importlib.import_module("logging") + +ap_lib = importlib.import_module("ap_lib") +controller = importlib.import_module("controller") + +""" + Custom Class Imports needed for OpenWifi 2.X +""" + +ConfigureController = controller.ConfigureController +Controller = controller.Controller +FMSUtils = controller.FMSUtils +ProvUtils = controller.ProvUtils +UProfileUtility = controller.UProfileUtility +APLIBS = ap_lib.APLIBS + + +class dut_lib_template: + """ + Standard OpenWifi wlan-testing specific variables + + """ + controller_data = {} + device_under_tests_info = [] + """ + OpenWifi 2.x Specific Variables that will be only scoped in dut_lib_template Library + + """ + ow_sec_url = "" + ow_sec_login_username = "" + ow_sec_login_password = "" + target = "dut_lib_template" + controller_library_object = object() + prov_library_object = object() + firmware_library_object = object() + dut_library_object = object() + supported_bands = ["2G", "5G", "6G", "5G-lower", "5G-upper"] + supported_modes = ["BRIDGE", "NAT", "VLAN"] + supported_encryption = ["open", + "wpa", + "wpa2_personal", + "wpa3_personal", + "wpa_wpa2_personal_mixed", + "wpa3_personal_mixed", + "wpa_enterprise", + "wpa2_enterprise", + "wpa3_enterprise", + "wpa_wpa2_enterprise_mixed", + "wpa3_enterprise_mixed", + "wpa3_enterprise_192" + ] + dut_lib_specific_encryption_translation = {"open": "none", + "wpa": "psk", + "wpa2_personal": "psk2", + "wpa3_personal": "sae", + "wpa3_personal_mixed": "sae-mixed", + "wpa_wpa2_personal_mixed": "psk-mixed", + "wpa_enterprise": "wpa", + "wpa2_enterprise": "wpa2", + "wpa3_enterprise": "wpa3", + "wpa_wpa2_enterprise_mixed": "wpa-mixed", + "wpa3_enterprise_mixed": "wpa3-mixed", + "wpa3_enterprise_192": "wpa3-192" + } + + def __init__(self, controller_data=None, target=None, + device_under_tests_info=[], logging_level=logging.INFO): + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging_level) + if target != self.target: + logging.error("Target version is : " + target + " Expected target is dut_lib_template") + pytest.exit("Target should be 'dut_lib_template', Current Target is : " + target) + if controller_data is None: + controller_data = {} + self.controller_data = controller_data + self.device_under_tests_info = device_under_tests_info + self.setup_metadata() + self.setup_objects() + self.setup_environment_properties() + + """ + Controller and Access Point specific metadata that is related to OpenWifi 2.x + """ + + def setup_metadata(self): + logging.info( + "Setting up the Controller metadata for dut_lib_template Library: " + str( + json.dumps(self.controller_data, indent=2))) + logging.info("Setting up the DUT metadata for dut_lib_template Library: " + str( + json.dumps(self.device_under_tests_info, indent=2))) + logging.info("Number of DUT's in lab_info.json: " + str(len(self.device_under_tests_info))) + self.ow_sec_url = self.controller_data["url"] + self.ow_sec_login_username = self.controller_data["username"] + self.ow_sec_login_password = self.controller_data["password"] + + def setup_objects(self): + try: + self.controller_library_object = Controller(controller_data=self.controller_data) + self.prov_library_object = ProvUtils(sdk_client=self.controller_library_object) + self.firmware_library_object = FMSUtils(sdk_client=self.controller_library_object) + except Exception as e: + pytest.fail("Unable to setup Controller Objects") + logging.error("Exception in setting up Controller objects:" + str(e)) + try: + self.dut_library_object = APLIBS(dut_data=self.device_under_tests_info) + except Exception as e: + logging.error("Exception in setting up Access Point Library object:" + str(e)) + pytest.fail("Unable to setup AP Objects") + + def teardown_objects(self): + self.controller_library_object.logout() + + """ Standard getter methods. Should be available for all type of libraries. Commonly used by wlan-testing""" + + def get_dut_library_object(self): + return self.dut_library_object + + def get_controller_library_object(self): + return self.controller_library_object + + def get_controller_data(self): + return self.controller_data + + def get_device_under_tests_info(self): + return self.device_under_tests_info + + def get_number_of_dut(self): + return len(self.device_under_tests_info) + + def get_dut_logs(self, dut_idx=0): + return self.dut_library_object.get_logs(idx=0) + + def get_controller_logs(self): + pass + + def get_dut_max_clients(self): + pass + + """ + standard method for translating the configurations from pytest: no need to change this + """ + + def setup_configuration_data(self, configuration=None, + requested_combination=None): + """Predefined function for getting configuration data for applied data""" + c_data = configuration.copy() + if c_data is None: + pytest.exit("No Configuration Received") + if requested_combination is None: + pytest.exit("No requested_combination Received") + rf_data = None + if c_data.keys().__contains__("rf"): + rf_data = c_data["rf"] + # base_band_keys = ["2G", "5G", "6G", "5G-lower", "5G-upper"] + base_dict = dict.fromkeys(self.supported_bands) + for i in base_dict: + base_dict[i] = [] + for i in requested_combination: + if i[0] in self.supported_bands: + base_dict[i[0]].append(self.dut_lib_specific_encryption_translation[i[1]]) + if i[1] in self.supported_bands: + base_dict[i[1]].append((self.dut_lib_specific_encryption_translation[i[0]])) + temp = [] + for i in list(base_dict.values()): + for j in i: + temp.append(j) + temp_conf = c_data["ssid_modes"].copy() + for i in temp_conf: + if self.dut_lib_specific_encryption_translation[i] not in temp: + c_data["ssid_modes"].pop(i) + + temp_conf = c_data["ssid_modes"].copy() + print(self.dut_lib_specific_encryption_translation) + for i in temp_conf: + for j in range(len(temp_conf[i])): + for k in temp_conf[i][j]["appliedRadios"]: + if self.dut_lib_specific_encryption_translation[i] not in base_dict[k]: + c_data["ssid_modes"][i][j]["appliedRadios"].remove(k) + if c_data["ssid_modes"][i][j]["appliedRadios"] == []: + c_data["ssid_modes"][i][j] = {} # .popi.popitem()) # .popitem() + + for i in c_data["ssid_modes"]: + c_data["ssid_modes"][i] = [x for x in c_data["ssid_modes"][i] if x != {}] + for ssids in c_data["ssid_modes"]: + for i in c_data["ssid_modes"][ssids]: + if i is not {}: + i["security"] = self.dut_lib_specific_encryption_translation[ssids] + temp_conf = c_data.copy() + for i in range(0, len(self.device_under_tests_info)): + if c_data["mode"] not in self.device_under_tests_info[i]["supported_modes"]: + pytest.skip(c_data["mode"] + " is not Supported by DUT") + for enc in c_data["ssid_modes"]: + for idx in c_data["ssid_modes"][enc]: + check = all( + item in self.device_under_tests_info[i]["supported_bands"] for item in idx["appliedRadios"]) + if not check: + temp_conf["ssid_modes"][enc].remove(idx) + for key in c_data["rf"]: + if key not in self.device_under_tests_info[i]["supported_bands"]: + print(key) + temp_conf["rf"][key] = None + + return temp_conf + + """ + setup_basic_configuration - Method to configure AP in basic operating modes with multiple SSID's and multiple AP's + This covers, basic and advanced test cases + """ + + def setup_basic_configuration(self, configuration=None, + requested_combination=None): + f_conf = self.setup_configuration_data(configuration=configuration, + requested_combination=requested_combination) + + logging.info("Selected Configuration: " + str(json.dumps(f_conf, indent=2))) + final_configuration = f_conf.copy() + """ + Write your logic here to setup the configuration on dut + """ + + # Setup Mode + + # Setup Radio Scenario + + # Setup Config Apply on all AP's + ret_val = dict() + for i in range(0, len(self.device_under_tests_info)): + self.pre_apply_check(idx=i) # Do check AP before pushing the configuration + # Write your logic here to push the configuration on DUT. + self.post_apply_check(idx=i) # Do check AP after pushing the configuration + ret_val[self.device_under_tests_info[i]["identifier"]] = {} + + # Write the Logic to create the data in below format. This should be returned from this function + """ + dut = { + '903cb36c4301': + {'ssid_data': + {0: {'ssid': 'ssid_wpa_2g_br', 'encryption': 'wpa', 'password': 'something', 'band': '2G', 'bssid': '90:3C:B3:6C:43:04'} + }, + 'radio_data':{ + '2G': + {'channel': 6, 'bandwidth': 20, 'frequency': 2437}, + '5G': + {'channel': None, 'bandwidth': None, 'frequency': None}, + '6G': + {'channel': None, 'bandwidth': None, 'frequency': None} + } + } + } + + """ + return ret_val + + """ + setup_special_configuration - Method to configure APs in mesh operating modes with multiple SSID's and multiple AP's + This covers, mesh and other roaming scenarios which includes any special type of modes + multiple AP's with WDS and Wifi Steering scenarios are also covered here + """ + + def setup_special_configuration(self, configuration=None, + requested_combination=None): + final_configuration = self.setup_configuration_data(configuration=configuration, + requested_combination=requested_combination) + + logging.info("Selected Configuration: " + str(json.dumps(final_configuration, indent=2))) + + profile_object = UProfileUtility(sdk_client=self.controller_library_object) + if final_configuration["mode"] in self.supported_modes: + profile_object.set_mode(mode=final_configuration["mode"]) + else: + pytest.skip(final_configuration["mode"] + " Mode is not supported") + + # Setup Radio Scenario + if final_configuration["rf"] != {}: + profile_object.set_radio_config(radio_config=final_configuration["rf"]) + else: + profile_object.set_radio_config() + for ssid in final_configuration["ssid_modes"]: + for ssid_data in final_configuration["ssid_modes"][ssid]: + profile_object.add_ssid(ssid_data=ssid_data) + logging.info( + "Configuration That is getting pushed: " + json.dumps(profile_object.base_profile_config, indent=2)) + r_val = False + + # Do check AP before pushing the configuration + # TODO + self.dut_library_object.check_serial_connection() + """ + serial connection check + ubus call ucentral status + save the current uuid + uci show ucentral + ifconfig + wifi status + start logger to collect ap logs before config apply + Timestamp before doing config apply + """ + + for dut in self.device_under_tests_info: + resp = profile_object.push_config(serial_number=dut["identifier"]) + logging.info("Response for Config apply: " + str(resp.status_code)) + if resp.status_code != 200: + logging.info("Failed to apply Configuration to AP. Response Code" + + str(resp.status_code) + + "Retrying in 5 Seconds... ") + time.sleep(5) + resp = profile_object.push_config(serial_number=dut["identifier"]) + if resp.status_code != 200: + logging.info("Failed to apply Config, Response code:" + str(resp.status_code)) + pytest.fail("Failed to apply Config, Response code :" + str(resp.status_code)) + if resp.status_code == 200: + r_val = True + # TODO + """ + serial connection check + ubus call ucentral status + save the current uuid and compare with the one before config apply + save the active config and compare with the latest apply + uci show + ifconfig + iwinfo + wifi status + start logger to collect ap logs before config apply + Timestamp after doing config apply + """ + return r_val + + def get_dut_version(self): + """ + get_dut_version + write your code to get ap version in + self.dut_library_object.get_ap_version() + """ + version_info = [] + for ap in range(len(self.device_under_tests_info)): + version_info.append(self.dut_library_object.get_ap_version(idx=ap, print_log=True)) + return version_info + + def get_controller_version(self): + version_info = dict() + # version_info["ow_fms"] = self.controller_library_object.get_sdk_version_fms() + # version_info["ow_gw"] = self.controller_library_object.get_sdk_version_gw() + # version_info["ow_sec"] = self.controller_library_object.get_sdk_version_sec() + # version_info["ow_prov"] = self.controller_library_object.get_sdk_version_prov() + # version_info["ow_rrm"] = self.controller_library_object.get_sdk_version_owrrm() + # version_info["ow_analytics"] = self.controller_library_object.get_sdk_version_ow_analytics() + # version_info["ow_sub"] = self.controller_library_object.get_sdk_version_owsub() + return version_info + + def pre_apply_check(self, idx=0): + """ + Write your code that you need to use + + """ + check = "PASSED" + if check is "FAILED": + pytest.fail("Write the message here for why precheck is failed") + + def post_apply_check(self, idx=0): + + check = "PASSED" + if check is "FAILED": + pytest.fail("Write the message here for why post apply is failed") + + def setup_environment_properties(self, add_allure_environment_property=None): + # Write the logic to add data to environment data + + if add_allure_environment_property is None: + return + add_allure_environment_property('Cloud-Controller-SDK-URL', self.controller_data.get("url")) + sdk_version_data = self.get_controller_version() + for microservice in sdk_version_data: + add_allure_environment_property(microservice + '-version', + str(sdk_version_data.get(microservice))) + dut_versions = self.get_dut_version() + for i in range(len(self.device_under_tests_info)): + add_allure_environment_property("Firmware-Version_" + self.device_under_tests_info[i]["identifier"], + str(dut_versions[i])) + + for dut in self.device_under_tests_info: + models = [] + identifiers = [] + models.append(dut["model"]) + identifiers.append(dut["identifier"]) + add_allure_environment_property('DUT-Model/s', ", ".join(models)) + add_allure_environment_property('Serial-Number/s', ", ".join(identifiers)) + + def setup_firmware(self): + # Write the logic to upgrade the firmware on DUT + upgrade_status = [] + return upgrade_status + + def simulate_radar(self, idx=0): + """Simulate radar command for DFS""" + ret = self.dut_library_object.dfs(idx=idx) + return ret + + def get_dfs_logs(self, idx=0): + """Get the ap logs after Simulate radar command""" + logs = self.dut_library_object.dfs_logread(idx=idx) + return logs + + def reboot(self, idx=0): + """Reboot the AP""" + ret = self.dut_library_object.reboot(idx=idx) + return ret + + +if __name__ == '__main__': + basic_05 = { + "target": "dut_lib_template", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf188n", + "supported_bands": ["2G", "5G", "6G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": "1.1.eth1", + "ssid": { + "mode": "BRIDGE", + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "0000c1018812", # identifier is important and should be unique for each dut within the device_under_tests in single testbed + "method": "serial", # serial | ssh | telnet + "host_ip": "10.28.3.103", # if method == serial, then host_ip - ip for remote system where dut is connected via serial + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP1", # if method == serial, then tty port for this dut + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", # dhcp-bridge | dhcp-external + "details": { + "manager_ip": "10.28.3.28", + "http_port": 8080, + "ssh_port": 22, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, # method - build | load + "wan_ports": { # addressing - dhcp-server | static | dynamic + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + "1.1.eth1": {"addressing": "dynamic"} + }, + "uplink_nat_ports": { + "1.1.eth1": {"addressing": "static", + "subnet": "10.28.2.16/24", + "gateway_ip": "10.28.2.1", + "ip_mask": "255.255.255.0" + } + } + } + } + } + var = dut_lib_template(controller_data=basic_05["controller"], + device_under_tests_info=basic_05["device_under_tests"], + target=basic_05["target"]) + + # var.setup_objects() + setup_params_general_two = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_br", "appliedRadios": ["5G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_6g_br", "appliedRadios": ["6G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False + } + x = setup_params_general_two.copy() + target = [['6G', 'wpa3_personal']] + d = var.setup_configuration_data(configuration=setup_params_general_two, requested_combination=target) + # d = var.setup_basic_configuration(configuration=setup_params_general_two, requested_combination=target) + print(x) + # var.setup_firmware() + # var.teardown_objects() diff --git a/dut_lib_template/openwrt_ctl.py b/dut_lib_template/openwrt_ctl.py new file mode 100755 index 000000000..c793c0ba8 --- /dev/null +++ b/dut_lib_template/openwrt_ctl.py @@ -0,0 +1,388 @@ +#!/usr/bin/python3 +''' + +make sure pexpect is installed: +$ sudo yum install python3-pexpect + +You might need to install pexpect-serial using pip: +$ pip3 install serial +$ pip3 install pexpect-serial + +./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0 + +# Set up reverse ssh tunnel +./openwrt_ctl.py --tty /dev/ttyAP1 --action ssh-tunnel \ + --value "ssh -y -y -f -N -T -M -R 9999:localhost:22 lanforge@10.28.3.100" \ + --value2 password-for-10.28.3.100 --log stdout --scheme serial --prompt root@Open +''' + +import sys + +if sys.version_info[0] != 3: + print("This script requires Python 3") + exit() + +try: + import importlib + re = importlib.import_module("re") + logging = importlib.import_module("logging") + time = importlib.import_module("time") + sleep = time.sleep + pexpect = importlib.import_module("pexpect") + serial = importlib.import_module("serial") + pexpect_serial = importlib.import_module("pexpect_serial") + SerialSpawn = pexpect_serial.SerialSpawn + pprint = importlib.import_module("pprint") + telnetlib = importlib.import_module("telnetlib") + argparse = importlib.import_module("argparse") +except ImportError as e: + logging.error(e) + sys.exit("Python Import Error: " + str(e)) + +default_host = "localhost" +default_ports = { + "serial": None, + "ssh": 22, + "telnet": 23 +} +NL = "\n" +CR = "\r\n" +Q = '"' +A = "'" +FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s' +prompt = "root@OpenWrt:" + + +def usage(): + print("$0 used connect to OpenWrt AP or similar Linux machine:") + print("-d|--dest IP address of the OpenWrt AP, for ssh/telnet scheme") + print("-o|--port IP port of the OpenWrt AP, for ssh/telnet scheme") + print("-t|--tty Serial port, if using serial scheme") + print("-u|--user login name") + print("-p|--pass password") + print("--prompt Prompt to look for when commands are done (default: root@OpenWrt)") + print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") + print("-l|--log file log messages here") + print("--action (logread | journalctl | lurk | sysupgrade | download | upload | reboot | cmd | ssh-tunnel") + print("--value (option to help complete the action") + print("--value2 (option to help complete the action, dest filename for download, passwd for ssh-tunnel") + print("-h|--help") + + +# see https://stackoverflow.com/a/13306095/11014343 +class FileAdapter(object): + def __init__(self, logger): + self.logger = logger + + def write(self, data): + # NOTE: data can be a partial line, multiple lines + data = data.strip() # ignore leading/trailing whitespace + if data: # non-blank + self.logger.info(data) + + def flush(self): + pass # leave it to logging to flush properly + + +def main(): + global prompt + + parser = argparse.ArgumentParser(description="OpenWrt AP Control Script") + parser.add_argument("-d", "--dest", type=str, help="address of the cisco controller_tests") + parser.add_argument("-o", "--port", type=int, help="control port on the controller_tests") + parser.add_argument("-u", "--user", type=str, help="credential login/username") + parser.add_argument("-p", "--passwd", type=str, help="credential password") + parser.add_argument("-P", "--prompt", type=str, help="Prompt to look for") + parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"], + help="Connect via serial, ssh or telnet") + parser.add_argument("-t", "--tty", type=str, help="tty serial device") + parser.add_argument("-l", "--log", type=str, help="logfile for messages, stdout means output to console") + parser.add_argument("--action", type=str, help="perform action", + choices=["logread", "journalctl", "lurk", "sysupgrade", "sysupgrade-n", "download", "upload", + "reboot", "cmd", "ssh-tunnel"]) + parser.add_argument("--value", type=str, help="set value") + parser.add_argument("--value2", type=str, help="set value2") + tty = None + + args = None + try: + args = parser.parse_args() + host = args.dest + scheme = args.scheme + port = args.port + # port = (default_ports[scheme], args.port)[args.port != None] + user = args.user + passwd = args.passwd + logfile = args.log + tty = args.tty; + if (args.prompt != None): + prompt = args.prompt + filehandler = None + except Exception as e: + logging.exception(e); + usage() + exit(2); + + console_handler = logging.StreamHandler() + formatter = logging.Formatter(FORMAT) + logg = logging.getLogger(__name__) + logg.setLevel(logging.DEBUG) + file_handler = None + if (logfile is not None): + if (logfile != "stdout"): + file_handler = logging.FileHandler(logfile, "w") + file_handler.setLevel(logging.DEBUG) + file_handler.setFormatter(formatter) + logg.addHandler(file_handler) + logging.basicConfig(format=FORMAT, handlers=[file_handler]) + else: + # stdout logging + logging.basicConfig(format=FORMAT, handlers=[console_handler]) + + CCPROMPT = prompt + + ser = None + egg = None # think "eggpect" + try: + if (scheme == "serial"): + # eggspect = pexpect.fdpexpect.fdspan(telcon, logfile=sys.stdout.buffer) + + ser = serial.Serial(tty, 115200, timeout=5) + + egg = SerialSpawn(ser); + egg.logfile = FileAdapter(logg) + egg.sendline(NL) + has_reset = False + if args.value == "reset-from-console": + has_reset = True + try: + logg.info("prompt: %s user: %s passwd: %s" % (prompt, user, passwd)) + while True: + i = egg.expect([prompt, "Please press Enter to activate", "login:", "Password:", "IPQ6018#"], + timeout=3) + logg.info("expect-0: %i" % (i)) + if (i == 0): + logg.info("Found prompt, login complete.") + break + if (i == 1): + logg.info("Sending newline") + egg.setdline(NL) + if (i == 2): + logg.info("Sending username: %s" % (user)) + egg.sendline(user) + if (i == 3): + logg.info("Sending password: %s" % (passwd)) + egg.sendline(passwd) + if (i == 4): # in bootloader + if has_reset: + logg.info("In boot loader, will reset and sleep 30 seconds") + egg.sendline("reset") + time.sleep(30) + egg.sendline(NL) + sys.exit(1) + else: + print("BOOTLOADER-CONSOLE-IPQ6018#") + break + else: + logg.info("Found prompt, login complete.") + break + except Exception as e: + # maybe something like 'logread -f' is running? + # send ctrl-c + egg.send(chr(3)) + + elif (scheme == "ssh"): + # Not implemented/tested currently. --Ben + if (port is None): + port = 22 + cmd = "ssh -p%d %s@%s" % (port, user, host) + logg.info("Spawn: " + cmd + NL) + egg = pexpect.spawn(cmd) + # egg.logfile_read = sys.stdout.buffer + egg.logfile = FileAdapter(logg) + i = egg.expect(["password:", "continue connecting (yes/no)?"], timeout=3) + time.sleep(0.1) + if i == 1: + egg.sendline('yes') + egg.expect('password:') + sleep(0.1) + egg.sendline(passwd) + + elif (scheme == "telnet"): + # Not implemented/tested currently. --Ben + if (port is None): + port = 23 + cmd = "telnet %s %d" % (host, port) + logg.info("Spawn: " + cmd + NL) + egg = pexpect.spawn(cmd) + egg.logfile = FileAdapter(logg) + time.sleep(0.1) + egg.sendline(' ') + egg.expect('User\:') + egg.sendline(user) + egg.expect('Password\:') + egg.sendline(passwd) + egg.sendline('config paging disable') + else: + usage() + exit(1) + except Exception as e: + logging.exception(e); + + command = None + + CLOSEDBYREMOTE = "closed by remote host." + CLOSEDCX = "Connection to .* closed." + + try: + egg.expect(CCPROMPT) + except Exception as e: + egg.sendline(NL) + + TO = 10 + wait_forever = False + + # Clean pending output + egg.sendline("echo __hello__") + egg.expect("__hello__") + egg.expect(CCPROMPT) + + logg.info("Action[%s] Value[%s] Value2[%s]" % (args.action, args.value, args.value2)) + + if (args.action == "reboot"): + command = "reboot" + TO = 60 + + if (args.action == "cmd"): + if (args.value is None): + raise Exception("cmd requires value to be set.") + command = "%s" % (args.value) + + if (args.action == "logread"): + command = "logread -f" + TO = 1 + wait_forever = True + + if (args.action == "journalctl"): + command = "journalctl -f" + TO = 1 + wait_forever = True + + if (args.action == "lurk"): + command = "date" + TO = 1 + wait_forever = True + + if (args.action == "ssh-tunnel"): + command = "%s" % (args.value) + passwd = "%s" % (args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline(passwd) + egg.expect(CCPROMPT, timeout=20) + return + + if ((args.action == "sysupgrade") or (args.action == "sysupgrade-n")): + command = "scp %s /tmp/new_img.bin" % (args.value) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + if (args.action == "sysupgrade-n"): + egg.sendline("sysupgrade -n /tmp/new_img.bin") + else: + egg.sendline("sysupgrade /tmp/new_img.bin") + egg.expect("link becomes ready", timeout=100) + return + + if (args.action == "download"): + command = "scp %s /tmp/%s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("Network unreachable, wait 15 seconds and try again.") + time.sleep(15) + command = "scp %s /tmp/%s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("ERROR: Could not connect to LANforge to get download file") + exit(2) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + return + + if (args.action == "upload"): + command = "scp %s %s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("Network unreachable, wait 15 seconds and try again.") + time.sleep(15) + command = "scp /tmp/%s %s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("ERROR: Could not connect to LANforge to put upload file") + exit(2) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + return + + if (command is None): + logg.info("No command specified, going to log out.") + else: + logg.info("Command[%s]" % command) + egg.sendline(command); + while True: + try: + i = egg.expect([CCPROMPT, "kmodloader: done loading kernel", "\n"], timeout=TO) + print(egg.before.decode('utf-8', 'ignore')) + if i == 1: + egg.sendline(' ') + egg.expect(CCPROMPT, timeout=20) + print(egg.before.decode('utf-8', 'ignore')) + if i == 2: # new line of text, just print and continue + continue + # wait_forever = False + if not wait_forever: + break + + except Exception as e: + # Some commands take a long time (logread -f) + if not wait_forever: + logging.exception(e) + break + + +# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- +if __name__ == '__main__': + main() + +#### +#### +#### diff --git a/dut_lib_template/schemacheck.py b/dut_lib_template/schemacheck.py new file mode 100644 index 000000000..62307392a --- /dev/null +++ b/dut_lib_template/schemacheck.py @@ -0,0 +1,603 @@ +""" +This class consists of functions which checks the schema of the configuration for lab +Whether the schema contains all the necessary key-value pairs or not +If not it will inform the required key-value pair +End of the program called every function that checks all the schema data +""" +import logging +import re + + +class SchemaCheck: + """ + Global variables are declared for easy modification and checks of some data + """ + global target_var, dut_keys, tg_keys, testbed_name + target_var = "dut_lib_template" + testbed_name = 'basic' + + def __init__(self, configuration=None): + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) + self.configuration = configuration + self.testbed_list = None + self.len_testbed_list = None + self.key_check_arr = ['target', 'controller', 'device_under_tests', 'traffic_generator'] + + def set_data(self): + """ + This Function sets the value of how many testbeds are there in the schema input file and stores the number of it + """ + testbed_list = [] + for key in self.configuration: + print(key) + testbed_list.append(key) + print(testbed_list) + self.testbed_list = testbed_list + self.len_testbed_list = len(testbed_list) + + def key_check(self): + """ + This fun checks the keys of the testbeds present in schema such as target, controller, DUT, traffic generator + """ + arr = [] + for a in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[a]]: + print(key) + arr.append(key) + print(arr) + if arr == self.key_check_arr: + arr.clear() + print("All keys are present in the schema for Testbed") + logging.info("All keys are present in the schema for Testbed") + else: + arr.clear() + logging.error("Not all the keys required present in schema for Testbed") + + def target_check(self): + """ + This function checks the global target we have declared is matching in the schema or not + """ + global target_var + for a in range(self.len_testbed_list): + if self.configuration[self.testbed_list[a]]['target'] == target_var: + logging.info("Target is matching") + else: + logging.error("Target variable is not matching") + + def controller_check(self): + """ + This func checks the keys of Controller such as Url, Username and password + """ + arr = ['url', 'username', 'password'] + lis = [] + for a in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[a]]['controller']: + lis.append(key) + print(self.testbed_list[a], "->", lis) + if lis == arr: + lis.clear() + print("All keys are present in the Controller data of schema") + logging.info("All keys are present in the Controller data of schema") + else: + lis.clear() + logging.error("Not all the Controller keys required present in schema") + + def dut_keys_check(self): + """ + This func checks DUT keys if every key is present in the schema or not + """ + global dut_keys + arr, arr2, arr3 = [], [], [] + dut_keys = ['model', 'supported_bands', 'supported_modes', 'wan_port', 'lan_port', 'ssid', 'mode', 'identifier', + 'method', 'host_ip', 'host_username', 'host_password', 'host_ssh_port', 'serial_tty', + 'firmware_version'] + for a in range(self.len_testbed_list): + for b in range(len(self.configuration[self.testbed_list[a]]['device_under_tests'])): + for key in self.configuration[self.testbed_list[a]]['device_under_tests'][b]: + arr.append(key) + arr2 = list(set(dut_keys) - set(arr)) + arr3.append(arr2) + # print(arr3) + arr.clear() + for a in range(len(arr3)): + if len(arr3[a]) == 0: + logging.info("All keys of DUT are present") + self.dut_values_check() + elif len(arr3[a]) == 1: + if arr3[a][0] == 'ssid': + logging.warning("Ssid key is not present" + str(self.testbed_list[a]) + "->" + str(arr3[a])) + self.dut_values_check() + else: + logging.error( + "Required keys of DUT are not present, Please include those" + str(self.testbed_list[a]) + + "->" + str(arr3[a])) + else: + logging.error( + "Not all Keys of DUT required are present" + str(self.testbed_list[a]) + "->" + str(arr3[a])) + + def dut_values_check(self): + """ + This func checks whether all the values of DUT Keys are valid or not. Use it after dut_keys_check() + """ + global dut_keys + print("DUT Key->value Check") + for a in range(self.len_testbed_list): + for b in range(len(self.configuration[self.testbed_list[a]]['device_under_tests'])): + for key, value in self.configuration[self.testbed_list[a]]['device_under_tests'][b].items(): + # print(key, value) + # print(type(value)) + if key == 'model': + if type(value) == str: + logging.info("Model key->values are present and eligible") + else: + logging.error( + "Model key->values which are present are not eligible" + str(key) + "->" + str(value)) + elif key == 'supported_bands': + if type(value) == list: + logging.info("Supported bands key->values are present and eligible") + else: + logging.error( + "Supported bands key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'supported_modes': + if type(value) == list: + logging.info("Supported modes key->values are present and eligible") + else: + logging.error( + "Supported modes key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'wan_port': + if type(value) == str: + x = re.search("\d.\d.", value) + if x is not None: + logging.info("Wan port key->values are present and eligible") + else: + logging.error( + "Wan port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'lan_port': + if value is None or type(value) == str: + if type(value) == str: + x = re.search("\d.\d.", value) + if x is not None: + logging.info("Lan port key->values are present and eligible") + else: + logging.error("Lan port key->values are present and not eligible") + else: + logging.info("Lan port is null or None") + else: + logging.error("Lan port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'ssid': + if type(value) == dict: + self.ssid_data_check() + logging.info("Ssid key->values are present and eligible") + else: + logging.error("Ssid key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'mode': + if type(value) == str: + logging.info("Mode key->values are present and eligible") + else: + logging.error("Mode key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'identifier': + if type(value) == str and type(value) is not None: + logging.info("Identifier key->values are present and eligible") + else: + logging.error( + "Identifier key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'method': + if type(value) == str and (value == 'serial' or value == 'ssh' or value == 'telnet'): + logging.info("Method key->values are present and eligible") + else: + logging.error("Method key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_ip': + if type(value) == str: + logging.info("Host IP key->values are present and eligible") + else: + logging.error("Host IP key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_username': + if type(value) == str: + logging.info("Host Username key->values are present and eligible") + else: + logging.error( + "Host Username key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_password': + if type(value) == str: + logging.info("Host Password key->values are present and eligible") + else: + logging.error( + "Host Password key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_ssh_port': + if type(value) == int: + logging.info("Host ssh Port key->values are present and eligible") + else: + logging.error( + "Host ssh Port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'serial_tty': + if type(value) == str: + logging.info("Serial tty key->values are present and eligible") + else: + logging.error( + "Serial tty key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'firmware_version': + if type(value) == str: + logging.info("Firmware version key->values are present and eligible") + else: + logging.error( + "Firmware version key->values which are present are not eligible" + str(key) + "->" + + str(value)) + + def traffic_generator_keys_check(self): + """ + THis Func checks the Traffic generator keys are present in the schema or not. It should be called after + dut_values_check() + """ + global tg_keys + tg_keys = ['name', 'testbed', 'scenario', 'details'] + lis = [] + for count in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[count]]['traffic_generator']: + lis.append(key) + print(self.testbed_list[count], "->", lis) + if lis == tg_keys: + lis.clear() + print("All keys are present in the Traffic generator data of schema") + logging.info("All keys are present in the Traffic generator data of schema") + self.traffic_generator_values_check(count) + else: + lis.clear() + logging.error("Not all the Traffic generator keys required are present in schema") + + def ssid_data_check(self): + """ + This func has to check the Ssid data check in DUT values if SSid key is present in it + """ + pass + + def traffic_generator_values_check(self, count): + """ + This func validates the traffic generator values and is called from traffic_generator_keys_check() after + keys are checked + """ + global testbed_name + logging.info("Traffic generator Key->value check") + for key, value in self.configuration[self.testbed_list[count]]['traffic_generator'].items(): + if key == 'name': + if type(value) == str: + logging.info("Name key->value are present and Eligible") + else: + logging.error("Name key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'testbed': + if type(value) == str and value == testbed_name: + logging.info("Testbed key->value are present and Eligible") + else: + logging.error("Testbed key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'scenario': + if type(value) == str and (value == 'dhcp-bridge' or value == 'dhcp-external'): + logging.info("Scenario key->value are present and Eligible") + else: + logging.error("Scenario key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'details': + if type(value) == dict: + self.tg_details_data_keys_check(count) + logging.info("Details key->value are present and Eligible") + else: + logging.error("Details key->values which are present are not eligible" + str(key) + "->" + + str(value)) + + def tg_details_data_keys_check(self, count): + """ + This Func checks the Details data keys of Traffic generator and is called in traffic_generator_values_check() + after details key is validated there for further validation of details dict + """ + global tg_details_keys + tg_details_keys = ['manager_ip', 'http_port', 'ssh_port', 'setup', 'wan_ports', 'lan_ports', 'uplink_nat_ports'] + lis = [] + for key in self.configuration[self.testbed_list[count]]['traffic_generator']['details']: + lis.append(key) + print(self.testbed_list[count], "->", lis) + if lis == tg_details_keys: + lis.clear() + print("All keys are present in the Traffic generator Details data of schema") + logging.info("All keys are present in the Traffic generator Details data of schema") + self.tg_details_values_check(count) + else: + lis.clear() + logging.error("Not all the Traffic generator Details keys required are present in schema") + + def tg_details_values_check(self, count): + """ + This Func validates the Details data Values of Traffic generator and is called in tg_details_data_keys_check() + after details keys are validated + """ + logging.info("Traffic generator Key->value check") + for key, value in self.configuration[self.testbed_list[count]]['traffic_generator']['details'].items(): + if key == 'manager_ip': + if type(value) == str: + logging.info("Manager ip key->value are present and Eligible") + else: + logging.error("Manager ip key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'http_port': + if type(value) == int: + logging.info("Http port key->value are present and Eligible") + else: + logging.error("Http port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'ssh_port': + if type(value) == int: + logging.info("Ssh port key->value are present and Eligible") + else: + logging.error("Ssh port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'setup': + if type(value) == dict: + key2 = self.configuration[self.testbed_list[count]]['traffic_generator']['details']['setup'] + value2 = self.configuration[self.testbed_list[count]]['traffic_generator']['details']['setup'][ + 'method'] + if key2 == 'method': + if type(value2) == str: + if value2 == 'build': + logging.info("Method - Build key->value are present and Eligible") + elif value2 == 'load': + if key2['DB'] == str: + logging.info("Method - Load key->value are present and Eligible") + else: + logging.error("Method key->values which are present are not eligible" + str(key) + + "->" + + str(value)) + logging.info("Setup key->value are present and Eligible") + else: + logging.error("Setup key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'wan_ports': + if type(value) == dict: + self.tg_ports_data_keys_check(key, count) + else: + logging.error("Wan Ports data is not eligible") + elif key == 'lan_ports': + if type(value) == dict: + # self.tg_ports_data_keys_check(key, count) + pass + else: + logging.error("Lan Ports data is not eligible") + elif key == 'uplink_nat_ports': + if type(value) == dict: + self.tg_ports_data_keys_check(key, count) + else: + logging.error("Uplink nat Ports data is not eligible") + + def tg_ports_data_keys_check(self, key, count): + """ + This Func validates the Ports data Values of Traffic generator and is called in tg_details_values_check() + after details values are validated. It will check for patterns like 1.1.eth2 + """ + ports = self.configuration[self.testbed_list[count]]['traffic_generator']['details'][key] + print("Data of ---------------", key) + print(ports) + for key1, value1 in ports.items(): + if type(key1) == str and type(value1) == dict: + x = re.search("\d.\d.", key1) + if x is not None: + logging.info("Key of" + str(key) + "->" + str(key1) + "is eligible") + self.tg_ports_addressing_check(value1) + else: + logging.error("Key of" + str(key) + "->" + str(key1) + "is not eligible") + else: + logging.error("Key of" + str(key) + "->" + str(key1) + "is not eligible and is not a string") + + @staticmethod + def tg_ports_addressing_check(value): + """ + This function checks the addressing data if values present has ip address pattern or not. It is called in + tg_ports_data_keys_check() + """ + print("Value--------------") + print(value) + if value['addressing'] == 'static': + for key, value2 in value.items(): + if key == 'ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip is present and eligible in ports") + elif key == 'gateway_ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d*$", value2) + if value2 is not None: + logging.info("Gateway Ip is present and eligible in ports") + elif key == 'ip_mask': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip Mask is present and eligible in ports") + elif key == 'dns_servers' and type(value2) == str: + logging.info("DNS server is present and eligible in ports") + elif key == 'addressing': + logging.info("Skipping Addressing ,As it is already verified") + else: + logging.error("Please look into the Ports data") + elif value['addressing'] == 'dynamic': + pass + elif value['addressing'] == 'dhcp-server': + for key, value2 in value.items(): + if key == 'ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip is present and eligible in ports") + elif key == 'gateway_ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d*$", value2) + if value2 is not None: + logging.info("Gateway Ip is present and eligible in ports") + elif key == 'ip_mask': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip Mask is present and eligible in ports") + elif key == 'dns_servers' and type(value2) == str: + logging.info("DNS server is present and eligible in ports") + elif key == 'addressing': + logging.info("Skipping Addressing ,As it is already verified") + else: + logging.error("Please look into the Ports data") + + +if __name__ == '__main__': + var = { + "CONFIGURATION": { + 'basic-06': { + 'target': 'dut_lib_template', + 'controller': { + 'url': 'https://sec-qa01.cicd.lab.wlan.tip.build:16001', + 'username': 'tip@ucentral.com', + 'password': 'OpenWifi%123' + }, + 'device_under_tests': [{ + 'model': 'edgecore_eap102', # Will be string + 'supported_bands': ['2G', '5G'], # ['2G', '5G', '6G'] + 'supported_modes': ['BRIDGE', 'NAT', 'VLAN'], # Will remain same + 'wan_port': '1.1.eth2', # Has to be + 'lan_port': '1.1.eth2', # Has to be null or none + 'ssid': { # Has to be seperate func + '2g-ssid': 'OpenWifi', + '5g-ssid': 'OpenWifi', + '6g-ssid': 'OpenWifi', + '2g-password': 'OpenWifi', + '5g-password': 'OpenWifi', + '6g-password': 'OpenWifi', + '2g-encryption': 'WPA2', + '5g-encryption': 'WPA2', + '6g-encryption': 'WPA3', + '2g-bssid': '68:7d:b4:5f:5c:31', + '5g-bssid': '68:7d:b4:5f:5c:3c', + '6g-bssid': '68:7d:b4:5f:5c:38' + }, + 'mode': 'wifi6', # ['wifi5', 'wifi6', 'wifi6e'] + 'identifier': '903cb39d6918', # Has to be not Null + 'method': 'serial', # Has to be serial, ssh, telnet + 'host_ip': 'localhost', # Ip or localhost + 'host_username': 'lanforge', # Str + 'host_password': 'pumpkin77', # Str + 'host_ssh_port': 8852, # Int + 'serial_tty': '/dev/ttyAP2', # Str + 'firmware_version': 'next-latest' # Str + }], + 'traffic_generator': { + 'name': 'lanforge', # STR + 'testbed': 'basic', # [basic, ] + 'scenario': 'dhcp-bridge', # dhcp-bridge, dhcp-external + 'details': { + 'manager_ip': 'localhost', # Str or ip + 'http_port': 8850, # int + 'ssh_port': 8851, # int + 'setup': {'method': 'build', 'DB': 'Test_Scenario_Automation'}, + # Method-> build/load, if load-> DB + 'wan_ports': { # addressing(dhcp-server, static, dynamic) Subnet-> ip/ cannot be eth2(1.1.eth2) + '1.1.eth2': {'addressing': 'dhcp-server', 'subnet': '172.16.0.1/16', 'dhcp': { # DICT + 'lease-first': 10, # int + 'lease-count': 10000, # int + 'lease-time': '6h' # str + } + } + }, + 'lan_ports': { + + }, + 'uplink_nat_ports': { + '1.1.eth3': { + 'addressing': 'static', # If static -> need ip, g_ip, ip_mask, dns + 'ip': '10.28.2.17', + 'gateway_ip': '10.28.2.1/24', + 'ip_mask': '255.255.255.0', + 'dns_servers': 'BLANK' + } + } + } + } + }, + "advance-03": { + "target": "dut_lib_template", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf196", + "supported_bands": ["2G", "5G", "6G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.3.eth2", + "lan_port": None, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6e", + "identifier": "824f816011e4", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 8902, + "serial_tty": "/dev/ttyAP0", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "10.28.3.117", + "http_port": 8900, + "ssh_port": 8901, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.3.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.3.eth3": { + "addressing": "static", + "ip": "10.28.2.39", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } + } + } + obj = SchemaCheck(var["CONFIGURATION"]) + obj.set_data() + obj.key_check() + obj.target_check() + obj.controller_check() + obj.dut_values_check() + obj.traffic_generator_keys_check() diff --git a/dut_lib_template/setup.py b/dut_lib_template/setup.py new file mode 100644 index 000000000..a121d9d23 --- /dev/null +++ b/dut_lib_template/setup.py @@ -0,0 +1,21 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name='dut_lib_template', + version='0.1', + scripts=['dut_lib_template.py', 'controller.py', 'ap_lib.py', 'SetupLibrary.py', 'openwrt_ctl.py'], + author="Shivam Thakur", + author_email="shivam.thakur@candelatech.com", + description="TIP OpenWIFI 2.X Library", + long_description=long_description, + long_description_content_type="text/markdown", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) diff --git a/lanforge/TIP_README.txt b/lanforge/TIP_README.txt deleted file mode 100644 index 71e77770d..000000000 --- a/lanforge/TIP_README.txt +++ /dev/null @@ -1,10 +0,0 @@ -The wlan-lanforge-scripts directory will be coppied to this location by the -../sync_repos.bas command. - -Changes for the wlan-lanforge-scripts repository should be sent in git-format -form if possible, to greearb@candelatech.com. These will then be applied to -the upstream lanforge-scripts repository if appropriate, and then pulled into -the TIP wlan-lanforge-scripts repo. - -Do not add any additional files to this directory without good reason. - diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/__init__.py b/libs/__init__.py similarity index 100% rename from tests/e2e/basic/performance_tests/wifi_capacity_test/__init__.py rename to libs/__init__.py diff --git a/libs/apnos/apnos.py b/libs/apnos/apnos.py index 51267a8fd..7f7b9a84f 100644 --- a/libs/apnos/apnos.py +++ b/libs/apnos/apnos.py @@ -1,735 +1,702 @@ -""" -APNOS Library : Used to execute SSH Commands in AP Using Direct-AP-SSH/ Jumphost-Serial Console - -Currently Having Methods: - 1. Get iwinfo - 2. AP Manager Satus - 3. Vif Config ssid's - 4. Vif State ssid's - 5. Get current Firmware - -""" -import json -import string -import time -import random - -import paramiko -import pytest -from scp import SCPClient -import os - - -class APNOS: - - def __init__(self, credentials=None, pwd=os.getcwd(), sdk="2.x"): - self.serial = credentials['serial'] - self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi" - self.sdk = sdk - if sdk == "2.x": - self.owrt_args = "--prompt root@" + self.serial + " -s serial --log stdout --user root --passwd openwifi" - if credentials is None: - print("No credentials Given") - exit() - self.ip = credentials['ip'] # if mode=1, enter jumphost ip else ap ip address - self.username = credentials['username'] # if mode=1, enter jumphost username else ap username - self.password = credentials['password'] # if mode=1, enter jumphost password else ap password - self.port = credentials['port'] # if mode=1, enter jumphost ssh port else ap ssh port - self.mode = credentials['jumphost'] # 1 for jumphost, 0 for direct ssh - - if 'mode' in credentials: - self.type = credentials['mode'] - - if self.mode: - self.tty = credentials['jumphost_tty'] # /dev/ttyAP1 - # kill minicom instance - client = self.ssh_cli_connect() - cmd = "pgrep 'minicom' -a" - stdin, stdout, stderr = client.exec_command(cmd) - a = str(stdout.read()).split("\\n") - for i in a: - if i.__contains__("minicom ap" + self.tty[-1]): - temp = i.split("minicom") - a = temp[0].replace(" ", "") - cmd = "kill " + str(a).replace("b'", "") - print(cmd) - stdin, stdout, stderr = client.exec_command(cmd) - cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"' - stdin, stdout, stderr = client.exec_command(cmd) - output = str(stdout.read()) - - if output.__contains__("False"): - cmd = 'mkdir ~/cicd-git/' - stdin, stdout, stderr = client.exec_command(cmd) - cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' - stdin, stdout, stderr = client.exec_command(cmd) - output = str(stdout.read()) - if output.__contains__("False"): - print("Copying openwrt_ctl serial control Script...") - with SCPClient(client.get_transport()) as scp: - scp.put(pwd + '/openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py') # Copy my_file.txt to the server - cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' - stdin, stdout, stderr = client.exec_command(cmd) - var = str(stdout.read()) - client.close() - if var.__contains__("True"): - print("APNOS Serial Setup OK") - else: - print("APNOS Serial Setup Fail") - - # Method to connect AP-CLI/ JUMPHOST-CLI - def ssh_cli_connect(self): - client = paramiko.SSHClient() - client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - print("Connecting to jumphost: %s@%s:%s" % ( - self.username, self.ip, self.port)) - client.connect(self.ip, username=self.username, password=self.password, - port=self.port, timeout=10, allow_agent=False, banner_timeout=200) - return client - - def reboot(self): - client = self.ssh_cli_connect() - - cmd = "reboot" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - client.close() - return output - - # Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI - - def get_bssid_band_mapping(self): - client = self.ssh_cli_connect() - cmd = 'iwinfo' - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - data = stdout.read() - client.close() - data = str(data).replace(" ", "").split("\\r\\n") - band_info = [] - client.close() - for i in data: - tmp = [] - if i.__contains__("AccessPoint"): - bssid = i.replace("AccessPoint:", "") - tmp.append(bssid.casefold()) - elif i.__contains__("MasterChannel"): - if i.split(":")[2].__contains__("2.4"): - tmp.append("2G") - else: - tmp.append("5G") - else: - tmp = [] - if tmp != []: - band_info.append(tmp) - bssi_band_mapping = {} - for i in range(len(band_info)): - if (i % 2) == 0: - bssi_band_mapping[band_info[i][0]] = band_info[i + 1][0] - return bssi_band_mapping - - # Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI - def get_vif_config(self): - client = self.ssh_cli_connect() - cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_Config -c" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - client.close() - - return output - - # Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI - def get_vif_state(self): - client = self.ssh_cli_connect() - cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_State -c" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - client.close() - return output - - # Method to get the vif_config ssid's of AP using AP-CLI/ JUMPHOST-CLI - def get_vif_config_ssids(self): - stdout = self.get_vif_config() - ssid_list = [] - for i in stdout.splitlines(): - ssid = str(i).replace(" ", "").split(".") - if ssid[0].split(":")[0] == "b'ssid": - ssid_list.append(ssid[0].split(":")[1].replace("'", "")) - return ssid_list - - # Method to get the vif_state ssid's of AP using AP-CLI/ JUMPHOST-CLI - def get_ssid_info(self): - stdout = self.get_vif_state() - ssid_info_list = [] - info = [] - for i in stdout.splitlines(): - ssid = str(i).replace(" ", "").split(".") - # print(ssid) - if ssid[0].split(":")[0] == "b'mac": - mac_info_list = ssid[0].split(":") - mac_info_list.pop(0) - info.append(":".join(mac_info_list).replace("'", "")) - if ssid[0].split(":")[0] == "b'security": - security = ssid[0].split(":")[1].split(",")[2].replace("]", "").replace('"', "").replace("'", "") - print(ssid[0].split(":")[1]) - if security != "OPEN": - if security == "WPA-PSK": - if ssid[0].split(":")[1].split(",")[6].__contains__("1"): - info.append("WPA") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if ssid[0].split(":")[1].split(",")[6].__contains__("2"): - info.append("WPA2") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if ssid[0].split(":")[1].split(",")[6].__contains__("mixed"): - info.append("WPA | WPA2") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if security == "WPA-SAE": - if ssid[0].split(":")[1].split(",")[6].__contains__("3"): - info.append("WPA3_PERSONAL") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if ssid[0].split(":")[1].split(",")[6].__contains__("mixed"): - info.append("WPA3_PERSONAL") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if security == "WPA-EAP": - info.append("EAP-TTLS") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - if security == "WPA3-EAP": - info.append("EAP-TTLS") - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - else: - security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") - info.append(security_key) - else: - info.append("OPEN") - if ssid[0].split(":")[0] == "b'ssid": - info.append(ssid[0].split(":")[1].replace("'", "")) - ssid_info_list.append(info) - info = [] - print(ssid_info_list) - return ssid_info_list - - # Get VIF State parameters - def get_vif_state_ssids(self): - stdout = self.get_vif_state() - ssid_list = [] - for i in stdout.splitlines(): - ssid = str(i).replace(" ", "").split(".") - if ssid[0].split(":")[0] == "b'ssid": - ssid_list.append(ssid[0].split(":")[1].replace("'", "")) - return ssid_list - - # Method to get the active firmware of AP using AP-CLI/ JUMPHOST-CLI - def get_active_firmware(self): - try: - client = self.ssh_cli_connect() - cmd = '/usr/opensync/bin/ovsh s AWLAN_Node -c | grep FW_IMAGE_ACTIVE' - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \ - f" --action cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - # print(output) - version_matrix = str(output.decode('utf-8').splitlines()) - version_matrix_split = version_matrix.partition('FW_IMAGE_ACTIVE","')[2] - cli_active_fw = version_matrix_split.partition('"],[')[0] - client.close() - except Exception as e: - print(e) - cli_active_fw = "Error" - return cli_active_fw - - # Method to get the manager state of AP using AP-CLI/ JUMPHOST-CLI - def get_manager_state(self): - try: - client = self.ssh_cli_connect() - cmd = '/usr/opensync/bin/ovsh s Manager -c | grep status' - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \ - f" --action cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = str(output.decode('utf-8').splitlines()) - # print(output, stderr.read()) - client.close() - except Exception as e: - print(e) - status = "Error" - return status - - def get_serial_number(self): - try: - client = self.ssh_cli_connect() - cmd = "node | grep serial_number" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - output = output.decode('utf-8').splitlines() - serial = output[1].replace(" ", "").split("|")[1] - client.close() - except Exception as e: - print(e) - serial = "Error" - return serial - - def get_redirector(self): - try: - client = self.ssh_cli_connect() - cmd = "node | grep redirector_addr" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - print(output, stderr.read()) - status = output.decode('utf-8').splitlines() - redirector = status[1].replace(" ", "").split("|")[1] - client.close() - except Exception as e: - print(e) - redirector = "Error" - return redirector - - def run_generic_command(self, cmd=""): - try: - client = self.ssh_cli_connect() - cmd = cmd - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = output.decode('utf-8').splitlines() - client.close() - except Exception as e: - print(e) - status = "Error" - return status - - def get_ucentral_status(self): - try: - client = self.ssh_cli_connect() - cmd = "ubus call ucentral status" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - print(output) - if 'latest' not in str(output): - print("ubus call ucentral status: command has invalid output", str(output)) - connected, latest, active = "Error", "Error1", "Error2" - return connected, latest, active - else: - connected = False - if "\"connected" in output.decode('utf-8').splitlines()[2]: - connected = True - # connected = output.decode('utf-8').splitlines()[2] - latest = output.decode('utf-8').splitlines()[3].split(":")[1].replace(" ", "").replace(",", "") - active = output.decode('utf-8').splitlines()[4].split(":")[1].replace(" ", "").replace(",", "") - client.close() - except Exception as e: - if output.__contains__(b'"connected":'): - pass - else: - pytest.exit("ubus call ucentral status: error" + str(output)) - print(e) - connected, latest, active = "Error", "Error", "Error" - return connected, latest, active - - def get_uc_latest_config(self): - try: - connected, latest, active = self.get_ucentral_status() - print() - client = self.ssh_cli_connect() - cmd = "cat /etc/ucentral/ucentral.cfg." + latest - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().decode('utf-8').splitlines()[1] - print(output) - json_output = json.loads(output) # , sort_keys=True) - print(type(json_output)) - client.close() - except Exception as e: - json_output = {} - print(e) - return json_output - - def get_uc_active_config(self): - try: - connected, latest, active = self.get_ucentral_status() - client = self.ssh_cli_connect() - cmd = "cat /etc/ucentral/ucentral.cfg." + active - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().decode('utf-8').splitlines()[1] - json_output = json.loads(output) # , sort_keys=True) - print(json_output) - client.close() - except Exception as e: - json_output = {} - print(e) - return json_output - - def get_interface_details(self): - r = self.get_wifi_status() - print(r) - wifi_info = {} - if self.sdk == "1.x": - for i in r: - for j in r[i]["interfaces"]: - encryption = j["config"]["encryption"] - if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \ - encryption == "sae" or encryption == "sae-mixed": - wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]] - else: - wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""] - print(wifi_info) - data = self.get_iwinfo() - for i in wifi_info.keys(): - wifi_info[i].append(data[i]) - - return wifi_info - if self.sdk == "2.x": - for i in r: - for j in r[i]["interfaces"]: - encryption = j["config"]["encryption"] - if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \ - encryption == "sae" or encryption == "sae-mixed": - wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]] - else: - wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""] - data = self.get_iwinfo() - print(wifi_info) - print(data) - for i in wifi_info.keys(): - wifi_info[i].append(data[i]) - return wifi_info - - def get_wifi_status(self): - try: - - client = self.ssh_cli_connect() - cmd = "wifi status" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - - output = stdout.read().decode('utf-8') - data = output.split() - data.pop(0) - data.pop(0) - data.pop(0) - OUT = "".join(data) - json_output = json.loads(OUT) - client.close() - except Exception as e: - json_output = False - print(e) - return json_output - - def get_iwinfo(self): - try: - # [['ssid_wpa2_2g', 'wpa', 'something', '2G'], ['ssid_wpa2_2g', 'wpa', 'something', '5G']] - # {'wlan0': ['"ssid_wpa3_p_5g"', '12:34:56:78:90:12', '5G'], 'wlan1': ['"ssid_wpa3_p_2g"','00:03:7F:12:34:56', '5G']} - client = self.ssh_cli_connect() - cmd = "iwinfo" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') - o = output.split() - iwinfo_bssid_data = {} - for i in range(len(o)): - if o[i].__contains__("ESSID"): - if o[i + 9].__contains__("2.4"): - band = "2G" - else: - band = "5G" - iwinfo_bssid_data[o[i - 1]] = [o[i + 1].replace('"', ''), o[i + 4], band] - client.close() - except Exception as e: - iwinfo_bssid_data = False - print(e) - return iwinfo_bssid_data - - def iwinfo(self): - client = self.ssh_cli_connect() - cmd = "iwinfo" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') - o = output - client.close() - return o - - def get_memory_profile(self): - client = self.ssh_cli_connect() - cmd = "ucode /usr/share/ucentral/sysinfo.uc" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') - o = output - client.close() - return o - - def gettxpower(self): - client = self.ssh_cli_connect() - cmd = "iw dev | grep txpower" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# iw dev | grep txpower", b"").decode('utf-8') - tx_power = output.replace("\t\t", "").split("\r\n") - tx_power.remove('') - tx_power.remove('\n') - cmd = "iw dev | grep Interface" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# iw dev | grep Interface", b"").decode('utf-8') - name = output.replace("\t", "").splitlines() - name.remove('') - name.pop(-1) - client.close() - 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: - client = self.ssh_cli_connect() - cmd = "logread" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = output.decode('utf-8').splitlines() - logread = status - logs = "" - for i in logread: - logs = logs + i + "\n" - client.close() - except Exception as e: - print(e) - logs = "" - return logs - - def get_ap_version_ucentral(self): - client = self.ssh_cli_connect() - cmd = "cat /tmp/ucentral.version" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read().replace(b":~# cat /tmp/ucentral.version", b"").decode('utf-8') - client.close() - return output - - def get_vifc(self): - client = self.ssh_cli_connect() - cmd = "vifC" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - client.close() - return output - - def get_vifs(self): - client = self.ssh_cli_connect() - cmd = "vifS" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - client.close() - return output - - def get_vlan(self): - stdout = self.get_vifs() - vlan_list = [] - for i in stdout.splitlines(): - vlan = str(i.strip()).replace("|", ".").split(".") - try: - if not vlan[0].find("b'vlan_id"): - vlan_list.append(vlan[1].strip()) - except: - pass - return vlan_list - - def get_ap_uci_show_ucentral(self): - try: - client = self.ssh_cli_connect() - cmd = "uci show ucentral" - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = output.decode('utf-8').splitlines() - for i in status: - if i.startswith("ucentral.config.server="): - status = i.split("=")[1] - client.close() - except Exception as e: - print(e) - status = "Error" - return status - - def dfs(self): - if self.type.lower() == "wifi5": - client = self.ssh_cli_connect() - cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd1}\" " - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = output.decode('utf-8') - status_count = int(status.count("True")) - print("status", status) - print("count", status_count) - client.close() - if status_count == 1: - cmd = "cd && cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar" - else: - cmd = "cd && cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar" - command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - elif self.type.lower() == "wifi6" or self.type.lower() == "wifi6e": - client = self.ssh_cli_connect() - cmd1 = '[ -f /sys/kernel/debug/ath11k/qcn6122_2/mac0/dfs_simulate_radar ] && echo "True" || echo "False"' - if self.mode: - cmd1 = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd1}\" " - stdin, stdout, stderr = client.exec_command(cmd1) - output = stdout.read() - print("Output", output) - status = output.decode('utf-8') - status_count = int(status.count("True")) - print("status", status) - print("count", status_count) - if status_count == 1: - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' - else: - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd qcn6122_2 && cd mac0 && ls && echo 1 > dfs_simulate_radar' - client.close() - print("cmd: ", cmd) - command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - client = self.ssh_cli_connect() - stdin, stdout, stderr = client.exec_command(command) - output = stdout.read() - print("Output", output) - client.close() - - def dfs_logread(self): - if self.type.lower() == "wifi5": - client = self.ssh_cli_connect() - cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' - stdin, stdout, stderr = client.exec_command(cmd1) - output = str(stdout.read()) - print("Output", output) - if output.__contains__("False"): - cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && logread | grep DFS" - else: - cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" - client.close() - # cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" - # print("cmd: ", cmd) - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - elif self.type.lower() == "wifi6" or self.type.lower() == "wifi6e": - client = self.ssh_cli_connect() - cmd1 = '[ -f /sys/kernel/debug/ath11k/qcn6122_2/mac0/dfs_simulate_radar ] && echo "True" || echo "False"' - cmd1 = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd1}\" " - stdin, stdout, stderr = client.exec_command(cmd1) - output = stdout.read() - print("Output", output) - status = output.decode('utf-8') - status_count = int(status.count("True")) - print("status", status) - print("count", status_count) - if status_count == 1: - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS' - else: - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd qcn6122_2 && cd mac0 && logread | grep DFS' - client.close() - print("cmd: ", cmd) - if self.mode: - cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ - f"cmd --value \"{cmd}\" " - try: - client = self.ssh_cli_connect() - stdin, stdout, stderr = client.exec_command(cmd) - output = stdout.read() - status = output.decode('utf-8').splitlines() - logread = status[-6:] - logs = "" - for i in logread: - logs = logs + i + "\n" - client.close() - except Exception as e: - print(e) - logs = "" - return logs - - -if __name__ == '__main__': - obj = { - "model": "cig_wf188n", - "mode": "wifi6", - "serial": "0000c1018812", - "jumphost": True, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP1", - "version": "next-latest" - } - var = APNOS(credentials=obj, sdk="2.x") - print(var.get_memory_profile()) +# """ +# APNOS Library : Used to execute SSH Commands in AP Using Direct-AP-SSH/ Jumphost-Serial Console +# +# Currently Having Methods: +# 1. Get iwinfo +# 2. AP Manager Satus +# 3. Vif Config ssid's +# 4. Vif State ssid's +# 5. Get current Firmware +# +# """ +# import json +# import os +# +# import paramiko +# import pytest +# from scp import SCPClient +# +# +# class APNOS: +# +# def __init__(self, credentials=None, pwd=os.getcwd(), sdk="2.x"): +# self.serial = credentials['serial'] +# self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi" +# self.sdk = sdk +# if sdk == "2.x": +# self.owrt_args = "--prompt root@" + self.serial + " -s serial --log stdout --user root --passwd openwifi" +# if credentials is None: +# print("No credentials Given") +# exit() +# self.ip = credentials['ip'] # if mode=1, enter jumphost ip else ap ip address +# self.username = credentials['username'] # if mode=1, enter jumphost username else ap username +# self.password = credentials['password'] # if mode=1, enter jumphost password else ap password +# self.port = credentials['port'] # if mode=1, enter jumphost ssh port else ap ssh port +# self.mode = credentials['jumphost'] # 1 for jumphost, 0 for direct ssh +# +# if 'mode' in credentials: +# self.type = credentials['mode'] +# +# if self.mode: +# self.tty = credentials['jumphost_tty'] # /dev/ttyAP1 +# # kill minicom instance +# client = self.ssh_cli_connect() +# cmd = "pgrep 'minicom' -a" +# stdin, stdout, stderr = client.exec_command(cmd) +# a = str(stdout.read()).split("\\n") +# for i in a: +# if i.__contains__("minicom ap" + self.tty[-1]): +# temp = i.split("minicom") +# a = temp[0].replace(" ", "") +# cmd = "kill " + str(a).replace("b'", "") +# print(cmd) +# stdin, stdout, stderr = client.exec_command(cmd) +# cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"' +# stdin, stdout, stderr = client.exec_command(cmd) +# output = str(stdout.read()) +# +# if output.__contains__("False"): +# cmd = 'mkdir ~/cicd-git/' +# stdin, stdout, stderr = client.exec_command(cmd) +# cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' +# stdin, stdout, stderr = client.exec_command(cmd) +# output = str(stdout.read()) +# if output.__contains__("False"): +# print("Copying openwrt_ctl serial control Script...") +# with SCPClient(client.get_transport()) as scp: +# scp.put(pwd + '/openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py') # Copy my_file.txt to the server +# cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' +# stdin, stdout, stderr = client.exec_command(cmd) +# var = str(stdout.read()) +# client.close() +# if var.__contains__("True"): +# print("APNOS Serial Setup OK") +# else: +# print("APNOS Serial Setup Fail") +# +# # Method to connect AP-CLI/ JUMPHOST-CLI +# def ssh_cli_connect(self): +# client = paramiko.SSHClient() +# client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) +# print("Connecting to jumphost: %s@%s:%s" % ( +# self.username, self.ip, self.port)) +# client.connect(self.ip, username=self.username, password=self.password, +# port=self.port, timeout=10, allow_agent=False, banner_timeout=200) +# return client +# +# def reboot(self): +# client = self.ssh_cli_connect() +# +# cmd = "reboot" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# client.close() +# return output +# +# # Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI +# +# def get_bssid_band_mapping(self): +# client = self.ssh_cli_connect() +# cmd = 'iwinfo' +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# data = stdout.read() +# client.close() +# data = str(data).replace(" ", "").split("\\r\\n") +# band_info = [] +# client.close() +# for i in data: +# tmp = [] +# if i.__contains__("AccessPoint"): +# bssid = i.replace("AccessPoint:", "") +# tmp.append(bssid.casefold()) +# elif i.__contains__("MasterChannel"): +# if i.split(":")[2].__contains__("2.4"): +# tmp.append("2G") +# else: +# tmp.append("5G") +# else: +# tmp = [] +# if tmp != []: +# band_info.append(tmp) +# bssi_band_mapping = {} +# for i in range(len(band_info)): +# if (i % 2) == 0: +# bssi_band_mapping[band_info[i][0]] = band_info[i + 1][0] +# return bssi_band_mapping +# +# # Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI +# def get_vif_config(self): +# client = self.ssh_cli_connect() +# cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_Config -c" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# client.close() +# +# return output +# +# # Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI +# def get_vif_state(self): +# client = self.ssh_cli_connect() +# cmd = "/usr/opensync/bin/ovsh s Wifi_VIF_State -c" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# client.close() +# return output +# +# # Method to get the vif_config ssid's of AP using AP-CLI/ JUMPHOST-CLI +# def get_vif_config_ssids(self): +# stdout = self.get_vif_config() +# ssid_list = [] +# for i in stdout.splitlines(): +# ssid = str(i).replace(" ", "").split(".") +# if ssid[0].split(":")[0] == "b'ssid": +# ssid_list.append(ssid[0].split(":")[1].replace("'", "")) +# return ssid_list +# +# # Method to get the vif_state ssid's of AP using AP-CLI/ JUMPHOST-CLI +# def get_ssid_info(self): +# stdout = self.get_vif_state() +# ssid_info_list = [] +# info = [] +# for i in stdout.splitlines(): +# ssid = str(i).replace(" ", "").split(".") +# # print(ssid) +# if ssid[0].split(":")[0] == "b'mac": +# mac_info_list = ssid[0].split(":") +# mac_info_list.pop(0) +# info.append(":".join(mac_info_list).replace("'", "")) +# if ssid[0].split(":")[0] == "b'security": +# security = ssid[0].split(":")[1].split(",")[2].replace("]", "").replace('"', "").replace("'", "") +# print(ssid[0].split(":")[1]) +# if security != "OPEN": +# if security == "WPA-PSK": +# if ssid[0].split(":")[1].split(",")[6].__contains__("1"): +# info.append("WPA") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if ssid[0].split(":")[1].split(",")[6].__contains__("2"): +# info.append("WPA2") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if ssid[0].split(":")[1].split(",")[6].__contains__("mixed"): +# info.append("WPA | WPA2") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if security == "WPA-SAE": +# if ssid[0].split(":")[1].split(",")[6].__contains__("3"): +# info.append("WPA3_PERSONAL") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if ssid[0].split(":")[1].split(",")[6].__contains__("mixed"): +# info.append("WPA3_PERSONAL") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if security == "WPA-EAP": +# info.append("EAP-TTLS") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# if security == "WPA3-EAP": +# info.append("EAP-TTLS") +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# else: +# security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "") +# info.append(security_key) +# else: +# info.append("OPEN") +# if ssid[0].split(":")[0] == "b'ssid": +# info.append(ssid[0].split(":")[1].replace("'", "")) +# ssid_info_list.append(info) +# info = [] +# print(ssid_info_list) +# return ssid_info_list +# +# # Get VIF State parameters +# def get_vif_state_ssids(self): +# stdout = self.get_vif_state() +# ssid_list = [] +# for i in stdout.splitlines(): +# ssid = str(i).replace(" ", "").split(".") +# if ssid[0].split(":")[0] == "b'ssid": +# ssid_list.append(ssid[0].split(":")[1].replace("'", "")) +# return ssid_list +# +# # Method to get the active firmware of AP using AP-CLI/ JUMPHOST-CLI +# def get_active_firmware(self): +# try: +# client = self.ssh_cli_connect() +# cmd = '/usr/opensync/bin/ovsh s AWLAN_Node -c | grep FW_IMAGE_ACTIVE' +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \ +# f" --action cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# # print(output) +# version_matrix = str(output.decode('utf-8').splitlines()) +# version_matrix_split = version_matrix.partition('FW_IMAGE_ACTIVE","')[2] +# cli_active_fw = version_matrix_split.partition('"],[')[0] +# client.close() +# except Exception as e: +# print(e) +# cli_active_fw = "Error" +# return cli_active_fw +# +# # Method to get the manager state of AP using AP-CLI/ JUMPHOST-CLI +# def get_manager_state(self): +# try: +# client = self.ssh_cli_connect() +# cmd = '/usr/opensync/bin/ovsh s Manager -c | grep status' +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty}" \ +# f" --action cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = str(output.decode('utf-8').splitlines()) +# # print(output, stderr.read()) +# client.close() +# except Exception as e: +# print(e) +# status = "Error" +# return status +# +# def get_serial_number(self): +# try: +# client = self.ssh_cli_connect() +# cmd = "node | grep serial_number" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# output = output.decode('utf-8').splitlines() +# serial = output[1].replace(" ", "").split("|")[1] +# client.close() +# except Exception as e: +# print(e) +# serial = "Error" +# return serial +# +# def get_redirector(self): +# try: +# client = self.ssh_cli_connect() +# cmd = "node | grep redirector_addr" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# print(output, stderr.read()) +# status = output.decode('utf-8').splitlines() +# redirector = status[1].replace(" ", "").split("|")[1] +# client.close() +# except Exception as e: +# print(e) +# redirector = "Error" +# return redirector +# +# def run_generic_command(self, cmd=""): +# try: +# client = self.ssh_cli_connect() +# cmd = cmd +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = output.decode('utf-8').splitlines() +# client.close() +# except Exception as e: +# print(e) +# status = "Error" +# return status +# +# def get_ucentral_status(self): +# try: +# client = self.ssh_cli_connect() +# cmd = "ubus call ucentral status" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# print(output) +# if 'latest' not in str(output): +# print("ubus call ucentral status: command has invalid output", str(output)) +# connected, latest, active = "Error", "Error1", "Error2" +# return connected, latest, active +# else: +# connected = False +# if "\"connected" in output.decode('utf-8').splitlines()[2]: +# connected = True +# # connected = output.decode('utf-8').splitlines()[2] +# latest = output.decode('utf-8').splitlines()[3].split(":")[1].replace(" ", "").replace(",", "") +# active = output.decode('utf-8').splitlines()[4].split(":")[1].replace(" ", "").replace(",", "") +# client.close() +# except Exception as e: +# if output.__contains__(b'"connected":'): +# pass +# else: +# pytest.exit("ubus call ucentral status: error" + str(output)) +# print(e) +# connected, latest, active = "Error", "Error", "Error" +# return connected, latest, active +# +# def get_uc_latest_config(self): +# try: +# connected, latest, active = self.get_ucentral_status() +# print() +# client = self.ssh_cli_connect() +# cmd = "cat /etc/ucentral/ucentral.cfg." + latest +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().decode('utf-8').splitlines()[1] +# print(output) +# json_output = json.loads(output) # , sort_keys=True) +# print(type(json_output)) +# client.close() +# except Exception as e: +# json_output = {} +# print(e) +# return json_output +# +# def get_uc_active_config(self): +# try: +# connected, latest, active = self.get_ucentral_status() +# client = self.ssh_cli_connect() +# cmd = "cat /etc/ucentral/ucentral.cfg." + active +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().decode('utf-8').splitlines()[1] +# json_output = json.loads(output) # , sort_keys=True) +# print(json_output) +# client.close() +# except Exception as e: +# json_output = {} +# print(e) +# return json_output +# +# def get_interface_details(self): +# r = self.get_wifi_status() +# print(r) +# wifi_info = {} +# if self.sdk == "1.x": +# for i in r: +# for j in r[i]["interfaces"]: +# encryption = j["config"]["encryption"] +# if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \ +# encryption == "sae" or encryption == "sae-mixed": +# wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]] +# else: +# wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""] +# print(wifi_info) +# data = self.get_iwinfo() +# for i in wifi_info.keys(): +# wifi_info[i].append(data[i]) +# +# return wifi_info +# if self.sdk == "2.x": +# for i in r: +# for j in r[i]["interfaces"]: +# encryption = j["config"]["encryption"] +# if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \ +# encryption == "sae" or encryption == "sae-mixed": +# wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]] +# else: +# wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""] +# data = self.get_iwinfo() +# print(wifi_info) +# print(data) +# for i in wifi_info.keys(): +# wifi_info[i].append(data[i]) +# return wifi_info +# +# def get_wifi_status(self): +# try: +# +# client = self.ssh_cli_connect() +# cmd = "wifi status" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# +# output = stdout.read().decode('utf-8') +# data = output.split() +# data.pop(0) +# data.pop(0) +# data.pop(0) +# OUT = "".join(data) +# json_output = json.loads(OUT) +# client.close() +# except Exception as e: +# json_output = False +# print(e) +# return json_output +# +# def get_iwinfo(self): +# try: +# # [['ssid_wpa2_2g', 'wpa', 'something', '2G'], ['ssid_wpa2_2g', 'wpa', 'something', '5G']] +# # {'wlan0': ['"ssid_wpa3_p_5g"', '12:34:56:78:90:12', '5G'], 'wlan1': ['"ssid_wpa3_p_2g"','00:03:7F:12:34:56', '5G']} +# client = self.ssh_cli_connect() +# cmd = "iwinfo" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') +# o = output.split() +# iwinfo_bssid_data = {} +# for i in range(len(o)): +# if o[i].__contains__("ESSID"): +# if o[i + 9].__contains__("2.4"): +# band = "2G" +# else: +# band = "5G" +# iwinfo_bssid_data[o[i - 1]] = [o[i + 1].replace('"', ''), o[i + 4], band] +# client.close() +# except Exception as e: +# iwinfo_bssid_data = False +# print(e) +# return iwinfo_bssid_data +# +# def iwinfo(self): +# client = self.ssh_cli_connect() +# cmd = "iwinfo" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') +# o = output +# client.close() +# return o +# +# def get_memory_profile(self): +# client = self.ssh_cli_connect() +# cmd = "ucode /usr/share/ucentral/sysinfo.uc" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8') +# o = output +# client.close() +# return o +# +# def gettxpower(self): +# client = self.ssh_cli_connect() +# cmd = "iw dev | grep txpower" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# iw dev | grep txpower", b"").decode('utf-8') +# tx_power = output.replace("\t\t", "").split("\r\n") +# tx_power.remove('') +# tx_power.remove('\n') +# cmd = "iw dev | grep Interface" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# iw dev | grep Interface", b"").decode('utf-8') +# name = output.replace("\t", "").splitlines() +# name.remove('') +# name.pop(-1) +# client.close() +# 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: +# client = self.ssh_cli_connect() +# cmd = "logread" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = output.decode('utf-8').splitlines() +# logread = status +# logs = "" +# for i in logread: +# logs = logs + i + "\n" +# client.close() +# except Exception as e: +# print(e) +# logs = "" +# return logs +# +# def get_ap_version_ucentral(self): +# client = self.ssh_cli_connect() +# cmd = "cat /tmp/ucentral.version" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read().replace(b":~# cat /tmp/ucentral.version", b"").decode('utf-8') +# client.close() +# return output +# +# def get_vifc(self): +# client = self.ssh_cli_connect() +# cmd = "vifC" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# client.close() +# return output +# +# def get_vifs(self): +# client = self.ssh_cli_connect() +# cmd = "vifS" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# client.close() +# return output +# +# def get_vlan(self): +# stdout = self.get_vifs() +# vlan_list = [] +# for i in stdout.splitlines(): +# vlan = str(i.strip()).replace("|", ".").split(".") +# try: +# if not vlan[0].find("b'vlan_id"): +# vlan_list.append(vlan[1].strip()) +# except: +# pass +# return vlan_list +# +# def get_ap_uci_show_ucentral(self): +# try: +# client = self.ssh_cli_connect() +# cmd = "uci show ucentral" +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = output.decode('utf-8').splitlines() +# for i in status: +# if i.startswith("ucentral.config.server="): +# status = i.split("=")[1] +# client.close() +# except Exception as e: +# print(e) +# status = "Error" +# return status +# +# def dfs(self): +# if self.type.lower() == "wifi5": +# client = self.ssh_cli_connect() +# cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd1}\" " +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = output.decode('utf-8') +# status_count = int(status.count("True")) +# print("status", status) +# print("count", status_count) +# client.close() +# if status_count == 1: +# cmd = "cd && cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar" +# else: +# cmd = "cd && cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar" +# command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# elif self.type.lower() == "wifi6" or self.type.lower() == "wifi6e": +# cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' +# print("cmd: ", cmd) +# if self.mode: +# command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# client = self.ssh_cli_connect() +# stdin, stdout, stderr = client.exec_command(command) +# output = stdout.read() +# print("Output", output) +# client.close() +# +# def dfs_logread(self): +# if self.type.lower() == "wifi5": +# client = self.ssh_cli_connect() +# cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' +# stdin, stdout, stderr = client.exec_command(cmd1) +# output = str(stdout.read()) +# print("Output", output) +# if output.__contains__("False"): +# cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && logread | grep DFS" +# else: +# cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" +# client.close() +# #cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" +# #print("cmd: ", cmd) +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# elif self.type.lower() == "wifi6" or self.type.lower() == "wifi6e": +# cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS' +# print("cmd: ", cmd) +# if self.mode: +# cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \ +# f"cmd --value \"{cmd}\" " +# try: +# client = self.ssh_cli_connect() +# stdin, stdout, stderr = client.exec_command(cmd) +# output = stdout.read() +# status = output.decode('utf-8').splitlines() +# logread = status[-6:] +# logs = "" +# for i in logread: +# logs = logs + i + "\n" +# client.close() +# except Exception as e: +# print(e) +# logs = "" +# return logs +# +# +# if __name__ == '__main__': +# obj = { +# "model": "cig_wf188n", +# "mode": "wifi6", +# "serial": "0000c1018812", +# "jumphost": True, +# "ip": "10.28.3.103", +# "username": "lanforge", +# "password": "pumpkin77", +# "port": 22, +# "jumphost_tty": "/dev/ttyAP1", +# "version": "next-latest" +# } +# var = APNOS(credentials=obj, sdk="2.x") +# print(var.get_memory_profile()) diff --git a/libs/apnos/openwrt_ctl.py b/libs/apnos/openwrt_ctl.py index d7b849389..829852cf2 100755 --- a/libs/apnos/openwrt_ctl.py +++ b/libs/apnos/openwrt_ctl.py @@ -1,376 +1,376 @@ -#!/usr/bin/python3 -''' - -make sure pexpect is installed: -$ sudo yum install python3-pexpect - -You might need to install pexpect-serial using pip: -$ pip3 install serial -$ pip3 install pexpect-serial - -./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0 - -# Set up reverse ssh tunnel -./openwrt_ctl.py --tty /dev/ttyAP1 --action ssh-tunnel \ - --value "ssh -y -y -f -N -T -M -R 9999:localhost:22 lanforge@10.28.3.100" \ - --value2 password-for-10.28.3.100 --log stdout --scheme serial --prompt root@Open -''' - -import sys - -if sys.version_info[0] != 3: - print("This script requires Python 3") - exit() - -import re -import logging -import time -from time import sleep -import pprint -import telnetlib -import argparse -import pexpect - -default_host = "localhost" -default_ports = { - "serial": None, - "ssh": 22, - "telnet": 23 -} -NL = "\n" -CR = "\r\n" -Q = '"' -A = "'" -FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s' -prompt = "root@OpenWrt:" - - -def usage(): - print("$0 used connect to OpenWrt AP or similar Linux machine:") - print("-d|--dest IP address of the OpenWrt AP, for ssh/telnet scheme") - print("-o|--port IP port of the OpenWrt AP, for ssh/telnet scheme") - print("-t|--tty Serial port, if using serial scheme") - print("-u|--user login name") - print("-p|--pass password") - print("--prompt Prompt to look for when commands are done (default: root@OpenWrt)") - print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") - print("-l|--log file log messages here") - print("--action (logread | journalctl | lurk | sysupgrade | download | upload | reboot | cmd | ssh-tunnel") - print("--value (option to help complete the action") - print("--value2 (option to help complete the action, dest filename for download, passwd for ssh-tunnel") - print("-h|--help") - - -# see https://stackoverflow.com/a/13306095/11014343 -class FileAdapter(object): - def __init__(self, logger): - self.logger = logger - - def write(self, data): - # NOTE: data can be a partial line, multiple lines - data = data.strip() # ignore leading/trailing whitespace - if data: # non-blank - self.logger.info(data) - - def flush(self): - pass # leave it to logging to flush properly - - -def main(): - global prompt - - parser = argparse.ArgumentParser(description="OpenWrt AP Control Script") - parser.add_argument("-d", "--dest", type=str, help="address of the cisco controller_tests") - parser.add_argument("-o", "--port", type=int, help="control port on the controller_tests") - parser.add_argument("-u", "--user", type=str, help="credential login/username") - parser.add_argument("-p", "--passwd", type=str, help="credential password") - parser.add_argument("-P", "--prompt", type=str, help="Prompt to look for") - parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"], - help="Connect via serial, ssh or telnet") - parser.add_argument("-t", "--tty", type=str, help="tty serial device") - parser.add_argument("-l", "--log", type=str, help="logfile for messages, stdout means output to console") - parser.add_argument("--action", type=str, help="perform action", - choices=["logread", "journalctl", "lurk", "sysupgrade", "sysupgrade-n", "download", "upload", - "reboot", "cmd", "ssh-tunnel"]) - parser.add_argument("--value", type=str, help="set value") - parser.add_argument("--value2", type=str, help="set value2") - tty = None - - args = None - try: - args = parser.parse_args() - host = args.dest - scheme = args.scheme - port = args.port - # port = (default_ports[scheme], args.port)[args.port != None] - user = args.user - passwd = args.passwd - logfile = args.log - tty = args.tty; - if (args.prompt != None): - prompt = args.prompt - filehandler = None - except Exception as e: - logging.exception(e); - usage() - exit(2); - - console_handler = logging.StreamHandler() - formatter = logging.Formatter(FORMAT) - logg = logging.getLogger(__name__) - logg.setLevel(logging.DEBUG) - file_handler = None - if (logfile is not None): - if (logfile != "stdout"): - file_handler = logging.FileHandler(logfile, "w") - file_handler.setLevel(logging.DEBUG) - file_handler.setFormatter(formatter) - logg.addHandler(file_handler) - logging.basicConfig(format=FORMAT, handlers=[file_handler]) - else: - # stdout logging - logging.basicConfig(format=FORMAT, handlers=[console_handler]) - - CCPROMPT = prompt - - ser = None - egg = None # think "eggpect" - try: - if (scheme == "serial"): - # eggspect = pexpect.fdpexpect.fdspan(telcon, logfile=sys.stdout.buffer) - import serial - from pexpect_serial import SerialSpawn - ser = serial.Serial(tty, 115200, timeout=5) - - egg = SerialSpawn(ser); - egg.logfile = FileAdapter(logg) - egg.sendline(NL) - has_reset = False - try: - logg.info("prompt: %s user: %s passwd: %s" % (prompt, user, passwd)) - while True: - i = egg.expect([prompt, "Please press Enter to activate", "login:", "Password:", "IPQ6018#"], - timeout=3) - logg.info("expect-0: %i" % (i)) - if (i == 0): - logg.info("Found prompt, login complete.") - break - if (i == 1): - logg.info("Sending newline") - egg.setdline(NL) - if (i == 2): - logg.info("Sending username: %s" % (user)) - egg.sendline(user) - if (i == 3): - logg.info("Sending password: %s" % (passwd)) - egg.sendline(passwd) - if (i == 4): # in bootloader - if has_reset: - logg.info("ERROR: Have reset once already, back in bootloader?") - sys.exit(1) - has_reset = True - logg.info("In boot loader, will reset and sleep 30 seconds") - egg.sendline("reset") - time.sleep(30) - egg.sendline(NL) - - except Exception as e: - # maybe something like 'logread -f' is running? - # send ctrl-c - egg.send(chr(3)) - - elif (scheme == "ssh"): - # Not implemented/tested currently. --Ben - if (port is None): - port = 22 - cmd = "ssh -p%d %s@%s" % (port, user, host) - logg.info("Spawn: " + cmd + NL) - egg = pexpect.spawn(cmd) - # egg.logfile_read = sys.stdout.buffer - egg.logfile = FileAdapter(logg) - i = egg.expect(["password:", "continue connecting (yes/no)?"], timeout=3) - time.sleep(0.1) - if i == 1: - egg.sendline('yes') - egg.expect('password:') - sleep(0.1) - egg.sendline(passwd) - - elif (scheme == "telnet"): - # Not implemented/tested currently. --Ben - if (port is None): - port = 23 - cmd = "telnet %s %d" % (host, port) - logg.info("Spawn: " + cmd + NL) - egg = pexpect.spawn(cmd) - egg.logfile = FileAdapter(logg) - time.sleep(0.1) - egg.sendline(' ') - egg.expect('User\:') - egg.sendline(user) - egg.expect('Password\:') - egg.sendline(passwd) - egg.sendline('config paging disable') - else: - usage() - exit(1) - except Exception as e: - logging.exception(e); - - command = None - - CLOSEDBYREMOTE = "closed by remote host." - CLOSEDCX = "Connection to .* closed." - - try: - egg.expect(CCPROMPT) - except Exception as e: - egg.sendline(NL) - - TO = 10 - wait_forever = False - - # Clean pending output - egg.sendline("echo __hello__") - egg.expect("__hello__") - egg.expect(CCPROMPT) - - logg.info("Action[%s] Value[%s] Value2[%s]" % (args.action, args.value, args.value2)) - - if (args.action == "reboot"): - command = "reboot" - TO = 60 - - if (args.action == "cmd"): - if (args.value is None): - raise Exception("cmd requires value to be set.") - command = "%s" % (args.value) - - if (args.action == "logread"): - command = "logread -f" - TO = 1 - wait_forever = True - - if (args.action == "journalctl"): - command = "journalctl -f" - TO = 1 - wait_forever = True - - if (args.action == "lurk"): - command = "date" - TO = 1 - wait_forever = True - - if (args.action == "ssh-tunnel"): - command = "%s" % (args.value) - passwd = "%s" % (args.value2) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) - if i == 1: - egg.sendline("y") - egg.expect("password:", timeout=5) - egg.sendline(passwd) - egg.expect(CCPROMPT, timeout=20) - return - - if ((args.action == "sysupgrade") or (args.action == "sysupgrade-n")): - command = "scp %s /tmp/new_img.bin" % (args.value) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) - if i == 1: - egg.sendline("y") - egg.expect("password:", timeout=5) - egg.sendline("lanforge") - egg.expect(CCPROMPT, timeout=20) - if (args.action == "sysupgrade-n"): - egg.sendline("sysupgrade -n /tmp/new_img.bin") - else: - egg.sendline("sysupgrade /tmp/new_img.bin") - egg.expect("link becomes ready", timeout=100) - return - - if (args.action == "download"): - command = "scp %s /tmp/%s" % (args.value, args.value2) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) - if i == 2: - print("Network unreachable, wait 15 seconds and try again.") - time.sleep(15) - command = "scp %s /tmp/%s" % (args.value, args.value2) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) - if i == 2: - print("ERROR: Could not connect to LANforge to get download file") - exit(2) - if i == 1: - egg.sendline("y") - egg.expect("password:", timeout=5) - egg.sendline("lanforge") - egg.expect(CCPROMPT, timeout=20) - return - - if (args.action == "upload"): - command = "scp %s %s" % (args.value, args.value2) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) - if i == 2: - print("Network unreachable, wait 15 seconds and try again.") - time.sleep(15) - command = "scp /tmp/%s %s" % (args.value, args.value2) - logg.info("Command[%s]" % command) - egg.sendline(command); - - i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) - if i == 2: - print("ERROR: Could not connect to LANforge to put upload file") - exit(2) - if i == 1: - egg.sendline("y") - egg.expect("password:", timeout=5) - egg.sendline("lanforge") - egg.expect(CCPROMPT, timeout=20) - return - - if (command is None): - logg.info("No command specified, going to log out.") - else: - logg.info("Command[%s]" % command) - egg.sendline(command); - while True: - try: - i = egg.expect([CCPROMPT, "kmodloader: done loading kernel", "\n"], timeout=TO) - print(egg.before.decode('utf-8', 'ignore')) - if i == 1: - egg.sendline(' ') - egg.expect(CCPROMPT, timeout=20) - print(egg.before.decode('utf-8', 'ignore')) - if i == 2: # new line of text, just print and continue - continue - - if not wait_forever: - break - - except Exception as e: - # Some commands take a long time (logread -f) - if not wait_forever: - logging.exception(e) - break - - -# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -if __name__ == '__main__': - main() - -#### -#### -#### +# #!/usr/bin/python3 +# ''' +# +# make sure pexpect is installed: +# $ sudo yum install python3-pexpect +# +# You might need to install pexpect-serial using pip: +# $ pip3 install serial +# $ pip3 install pexpect-serial +# +# ./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0 +# +# # Set up reverse ssh tunnel +# ./openwrt_ctl.py --tty /dev/ttyAP1 --action ssh-tunnel \ +# --value "ssh -y -y -f -N -T -M -R 9999:localhost:22 lanforge@10.28.3.100" \ +# --value2 password-for-10.28.3.100 --log stdout --scheme serial --prompt root@Open +# ''' +# +# import sys +# +# if sys.version_info[0] != 3: +# print("This script requires Python 3") +# exit() +# +# import re +# import logging +# import time +# from time import sleep +# import pprint +# import telnetlib +# import argparse +# import pexpect +# +# default_host = "localhost" +# default_ports = { +# "serial": None, +# "ssh": 22, +# "telnet": 23 +# } +# NL = "\n" +# CR = "\r\n" +# Q = '"' +# A = "'" +# FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s' +# prompt = "root@OpenWrt:" +# +# +# def usage(): +# print("$0 used connect to OpenWrt AP or similar Linux machine:") +# print("-d|--dest IP address of the OpenWrt AP, for ssh/telnet scheme") +# print("-o|--port IP port of the OpenWrt AP, for ssh/telnet scheme") +# print("-t|--tty Serial port, if using serial scheme") +# print("-u|--user login name") +# print("-p|--pass password") +# print("--prompt Prompt to look for when commands are done (default: root@OpenWrt)") +# print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") +# print("-l|--log file log messages here") +# print("--action (logread | journalctl | lurk | sysupgrade | download | upload | reboot | cmd | ssh-tunnel") +# print("--value (option to help complete the action") +# print("--value2 (option to help complete the action, dest filename for download, passwd for ssh-tunnel") +# print("-h|--help") +# +# +# # see https://stackoverflow.com/a/13306095/11014343 +# class FileAdapter(object): +# def __init__(self, logger): +# self.logger = logger +# +# def write(self, data): +# # NOTE: data can be a partial line, multiple lines +# data = data.strip() # ignore leading/trailing whitespace +# if data: # non-blank +# self.logger.info(data) +# +# def flush(self): +# pass # leave it to logging to flush properly +# +# +# def main(): +# global prompt +# +# parser = argparse.ArgumentParser(description="OpenWrt AP Control Script") +# parser.add_argument("-d", "--dest", type=str, help="address of the cisco controller_tests") +# parser.add_argument("-o", "--port", type=int, help="control port on the controller_tests") +# parser.add_argument("-u", "--user", type=str, help="credential login/username") +# parser.add_argument("-p", "--passwd", type=str, help="credential password") +# parser.add_argument("-P", "--prompt", type=str, help="Prompt to look for") +# parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"], +# help="Connect via serial, ssh or telnet") +# parser.add_argument("-t", "--tty", type=str, help="tty serial device") +# parser.add_argument("-l", "--log", type=str, help="logfile for messages, stdout means output to console") +# parser.add_argument("--action", type=str, help="perform action", +# choices=["logread", "journalctl", "lurk", "sysupgrade", "sysupgrade-n", "download", "upload", +# "reboot", "cmd", "ssh-tunnel"]) +# parser.add_argument("--value", type=str, help="set value") +# parser.add_argument("--value2", type=str, help="set value2") +# tty = None +# +# args = None +# try: +# args = parser.parse_args() +# host = args.dest +# scheme = args.scheme +# port = args.port +# # port = (default_ports[scheme], args.port)[args.port != None] +# user = args.user +# passwd = args.passwd +# logfile = args.log +# tty = args.tty; +# if (args.prompt != None): +# prompt = args.prompt +# filehandler = None +# except Exception as e: +# logging.exception(e); +# usage() +# exit(2); +# +# console_handler = logging.StreamHandler() +# formatter = logging.Formatter(FORMAT) +# logg = logging.getLogger(__name__) +# logg.setLevel(logging.DEBUG) +# file_handler = None +# if (logfile is not None): +# if (logfile != "stdout"): +# file_handler = logging.FileHandler(logfile, "w") +# file_handler.setLevel(logging.DEBUG) +# file_handler.setFormatter(formatter) +# logg.addHandler(file_handler) +# logging.basicConfig(format=FORMAT, handlers=[file_handler]) +# else: +# # stdout logging +# logging.basicConfig(format=FORMAT, handlers=[console_handler]) +# +# CCPROMPT = prompt +# +# ser = None +# egg = None # think "eggpect" +# try: +# if (scheme == "serial"): +# # eggspect = pexpect.fdpexpect.fdspan(telcon, logfile=sys.stdout.buffer) +# import serial +# from pexpect_serial import SerialSpawn +# ser = serial.Serial(tty, 115200, timeout=5) +# +# egg = SerialSpawn(ser); +# egg.logfile = FileAdapter(logg) +# egg.sendline(NL) +# has_reset = False +# try: +# logg.info("prompt: %s user: %s passwd: %s" % (prompt, user, passwd)) +# while True: +# i = egg.expect([prompt, "Please press Enter to activate", "login:", "Password:", "IPQ6018#"], +# timeout=3) +# logg.info("expect-0: %i" % (i)) +# if (i == 0): +# logg.info("Found prompt, login complete.") +# break +# if (i == 1): +# logg.info("Sending newline") +# egg.setdline(NL) +# if (i == 2): +# logg.info("Sending username: %s" % (user)) +# egg.sendline(user) +# if (i == 3): +# logg.info("Sending password: %s" % (passwd)) +# egg.sendline(passwd) +# if (i == 4): # in bootloader +# if has_reset: +# logg.info("ERROR: Have reset once already, back in bootloader?") +# sys.exit(1) +# has_reset = True +# logg.info("In boot loader, will reset and sleep 30 seconds") +# egg.sendline("reset") +# time.sleep(30) +# egg.sendline(NL) +# +# except Exception as e: +# # maybe something like 'logread -f' is running? +# # send ctrl-c +# egg.send(chr(3)) +# +# elif (scheme == "ssh"): +# # Not implemented/tested currently. --Ben +# if (port is None): +# port = 22 +# cmd = "ssh -p%d %s@%s" % (port, user, host) +# logg.info("Spawn: " + cmd + NL) +# egg = pexpect.spawn(cmd) +# # egg.logfile_read = sys.stdout.buffer +# egg.logfile = FileAdapter(logg) +# i = egg.expect(["password:", "continue connecting (yes/no)?"], timeout=3) +# time.sleep(0.1) +# if i == 1: +# egg.sendline('yes') +# egg.expect('password:') +# sleep(0.1) +# egg.sendline(passwd) +# +# elif (scheme == "telnet"): +# # Not implemented/tested currently. --Ben +# if (port is None): +# port = 23 +# cmd = "telnet %s %d" % (host, port) +# logg.info("Spawn: " + cmd + NL) +# egg = pexpect.spawn(cmd) +# egg.logfile = FileAdapter(logg) +# time.sleep(0.1) +# egg.sendline(' ') +# egg.expect('User\:') +# egg.sendline(user) +# egg.expect('Password\:') +# egg.sendline(passwd) +# egg.sendline('config paging disable') +# else: +# usage() +# exit(1) +# except Exception as e: +# logging.exception(e); +# +# command = None +# +# CLOSEDBYREMOTE = "closed by remote host." +# CLOSEDCX = "Connection to .* closed." +# +# try: +# egg.expect(CCPROMPT) +# except Exception as e: +# egg.sendline(NL) +# +# TO = 10 +# wait_forever = False +# +# # Clean pending output +# egg.sendline("echo __hello__") +# egg.expect("__hello__") +# egg.expect(CCPROMPT) +# +# logg.info("Action[%s] Value[%s] Value2[%s]" % (args.action, args.value, args.value2)) +# +# if (args.action == "reboot"): +# command = "reboot" +# TO = 60 +# +# if (args.action == "cmd"): +# if (args.value is None): +# raise Exception("cmd requires value to be set.") +# command = "%s" % (args.value) +# +# if (args.action == "logread"): +# command = "logread -f" +# TO = 1 +# wait_forever = True +# +# if (args.action == "journalctl"): +# command = "journalctl -f" +# TO = 1 +# wait_forever = True +# +# if (args.action == "lurk"): +# command = "date" +# TO = 1 +# wait_forever = True +# +# if (args.action == "ssh-tunnel"): +# command = "%s" % (args.value) +# passwd = "%s" % (args.value2) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) +# if i == 1: +# egg.sendline("y") +# egg.expect("password:", timeout=5) +# egg.sendline(passwd) +# egg.expect(CCPROMPT, timeout=20) +# return +# +# if ((args.action == "sysupgrade") or (args.action == "sysupgrade-n")): +# command = "scp %s /tmp/new_img.bin" % (args.value) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) +# if i == 1: +# egg.sendline("y") +# egg.expect("password:", timeout=5) +# egg.sendline("lanforge") +# egg.expect(CCPROMPT, timeout=20) +# if (args.action == "sysupgrade-n"): +# egg.sendline("sysupgrade -n /tmp/new_img.bin") +# else: +# egg.sendline("sysupgrade /tmp/new_img.bin") +# egg.expect("link becomes ready", timeout=100) +# return +# +# if (args.action == "download"): +# command = "scp %s /tmp/%s" % (args.value, args.value2) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) +# if i == 2: +# print("Network unreachable, wait 15 seconds and try again.") +# time.sleep(15) +# command = "scp %s /tmp/%s" % (args.value, args.value2) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) +# if i == 2: +# print("ERROR: Could not connect to LANforge to get download file") +# exit(2) +# if i == 1: +# egg.sendline("y") +# egg.expect("password:", timeout=5) +# egg.sendline("lanforge") +# egg.expect(CCPROMPT, timeout=20) +# return +# +# if (args.action == "upload"): +# command = "scp %s %s" % (args.value, args.value2) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) +# if i == 2: +# print("Network unreachable, wait 15 seconds and try again.") +# time.sleep(15) +# command = "scp /tmp/%s %s" % (args.value, args.value2) +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# +# i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) +# if i == 2: +# print("ERROR: Could not connect to LANforge to put upload file") +# exit(2) +# if i == 1: +# egg.sendline("y") +# egg.expect("password:", timeout=5) +# egg.sendline("lanforge") +# egg.expect(CCPROMPT, timeout=20) +# return +# +# if (command is None): +# logg.info("No command specified, going to log out.") +# else: +# logg.info("Command[%s]" % command) +# egg.sendline(command); +# while True: +# try: +# i = egg.expect([CCPROMPT, "kmodloader: done loading kernel", "\n"], timeout=TO) +# print(egg.before.decode('utf-8', 'ignore')) +# if i == 1: +# egg.sendline(' ') +# egg.expect(CCPROMPT, timeout=20) +# print(egg.before.decode('utf-8', 'ignore')) +# if i == 2: # new line of text, just print and continue +# continue +# +# if not wait_forever: +# break +# +# except Exception as e: +# # Some commands take a long time (logread -f) +# if not wait_forever: +# logging.exception(e) +# break +# +# +# # ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- +# if __name__ == '__main__': +# main() +# +# #### +# #### +# #### diff --git a/libs/controller/controller_2x/controller.py b/libs/controller/controller_2x/controller.py index 79acf39fc..3a953a3c0 100644 --- a/libs/controller/controller_2x/controller.py +++ b/libs/controller/controller_2x/controller.py @@ -306,8 +306,8 @@ class Controller(ConfigureController): self.check_response("DELETE", resp, self.make_headers(), "", uri) return resp - def get_commands(self, serial_number): - uri = self.build_uri("commands?serialNumber=" + serial_number) + def get_commands(self): + uri = self.build_uri("commands") print("Sending Command: " + "\n" + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + "URI: " + str(uri) + "\n" + @@ -1645,16 +1645,16 @@ class UProfileUtility: def add_ssid(self, ssid_data, radius=False, radius_auth_data={}, radius_accounting_data={}): print("ssid data : ", ssid_data) ssid_info = {'name': ssid_data["ssid_name"], "bss-mode": "ap", "wifi-bands": [], "services": ["wifi-frames"]} - for options in ssid_data: if options == "multi-psk": ssid_info[options] = ssid_data[options] print("hi", ssid_info) if options == "rate-limit": ssid_info[options] = ssid_data[options] - if options == "isolate-clients": + if options == "radius_auth_data": + ssid_info[options] = ssid_data[options] + if options == "radius_acc_data": ssid_info[options] = ssid_data[options] - for i in ssid_data["appliedRadios"]: ssid_info["wifi-bands"].append(i) ssid_info['encryption'] = {} diff --git a/libs/lanforge/README.md b/libs/lanforge/README.md deleted file mode 100644 index bde11cf24..000000000 --- a/libs/lanforge/README.md +++ /dev/null @@ -1 +0,0 @@ -## LANForge library diff --git a/libs/lanforge/lf_lib.py b/libs/lanforge/lf_lib.py deleted file mode 100644 index ccd6601eb..000000000 --- a/libs/lanforge/lf_lib.py +++ /dev/null @@ -1,43 +0,0 @@ -# create TCP and UDP traffic, run it a short amount of time. - -######################################################################################################### -# Used by Nightly_Sanity and eap_connect ############################################################ -######################################################################################################### - -# create TCP and UDP traffic, run it a short amount of time, -# self.l3_udp_profile.start_cx(): To Start UDP - - -class createTraffic: - - def __init__(self, localrealm, sta_prefix, resource, upstream_port): - self.localrealm = localrealm - self.sta_prefix = sta_prefix - self.resource = resource - self.upstream_port = upstream_port - self.l3_udp_profile = localrealm.new_l3_cx_profile() - self.l3_tcp_profile = localrealm.new_l3_cx_profile() - - def lf_l3_udp_profile(self): - # Create UDP endpoints - self.l3_udp_profile.side_a_min_bps = 128000 - self.l3_udp_profile.side_b_min_bps = 128000 - self.l3_udp_profile.side_a_min_pdu = 1200 - self.l3_udp_profile.side_b_min_pdu = 1500 - self.l3_udp_profile.report_timer = 1000 - self.l3_udp_profile.name_prefix = "udp" - self.l3_udp_profile.create(endp_type="lf_udp", - side_a=list(self.localrealm.find_ports_like("%s*" % self.sta_prefix)), - side_b="%d.%s" % (self.resource, self.upstream_port), - suppress_related_commands=True) - - def lf_l3_tcp_profile(self): - # Create TCP endpoints - self.l3_tcp_profile.side_a_min_bps = 128000 - self.l3_tcp_profile.side_b_min_bps = 56000 - self.l3_tcp_profile.name_prefix = "tcp" - self.l3_tcp_profile.report_timer = 1000 - self.l3_tcp_profile.create(endp_type="lf_tcp", - side_a=list(self.localrealm.find_ports_like("%s*" % self.sta_prefix)), - side_b="%d.%s" % (self.resource, self.upstream_port), - suppress_related_commands=True) diff --git a/libs/lanforge/lf_tools.py b/libs/lanforge/lf_tools.py deleted file mode 100755 index 8c0382148..000000000 --- a/libs/lanforge/lf_tools.py +++ /dev/null @@ -1,892 +0,0 @@ -import re -import sys -import os -import importlib - -import pytest - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') -for folder in 'py-json', 'py-scripts': - if folder not in sys.path: - sys.path.append(f'../../lanforge/lanforge-scripts/{folder}') - -sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") - -sys.path.append(f'../libs') -sys.path.append(f'../libs/lanforge/') -import allure -from sta_connect2 import StaConnect2 - -from create_chamberview import CreateChamberview -from create_chamberview_dut import DUT -import time -from LANforge.lfcli_base import LFCliBase -import json -import os -import pandas as pd - -realm = importlib.import_module("py-json.realm") -Realm = realm.Realm -import logging - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) -stdout_handler = logging.StreamHandler(sys.stdout) -LOGGER.addHandler(stdout_handler) - - -class ChamberView: - def __init__(self, lanforge_data=None, access_point_data=None, run_lf=False, debug=True, testbed=None, cc_1=False, ap_version=None): - print("lanforge data", lanforge_data) - print("access point data", access_point_data) - self.access_point_data = access_point_data - self.access_point_data = access_point_data - self.run_lf = run_lf - self.cc_1 = cc_1 - self.version = ap_version - print("testbed", testbed) - if "type" in lanforge_data.keys(): - if lanforge_data["type"] == "Non-mesh": - self.lanforge_ip = lanforge_data["ip"] - self.lanforge_port = lanforge_data["port"] - self.ssh_port = lanforge_data["ssh_port"] - self.twog_radios = lanforge_data["2.4G-Radio"] - self.fiveg_radios = lanforge_data["5G-Radio"] - self.ax_radios = lanforge_data["AX-Radio"] - self.upstream_port = lanforge_data["upstream"] - self.uplink_port = lanforge_data["uplink"] - self.upstream_subnet = lanforge_data["upstream_subnet"] - self.upstream_resources = self.upstream_port.split(".")[0] + "." + self.upstream_port.split(".")[1] - self.uplink_resources = self.uplink_port.split(".")[0] + "." + self.uplink_port.split(".")[1] - self.scenario_name = testbed - self.debug = debug - self.exit_on_error = False - self.dut_idx_mapping = {} - self.ssid_list = [] - self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug) - self.local_realm = realm.Realm(lfclient_host=self.lanforge_ip, lfclient_port=self.lanforge_port) - self.raw_line = [ - ["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + - self.upstream_port.split(".") - [2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet - + "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"] - ] - self.CreateChamberview = CreateChamberview(self.lanforge_ip, self.lanforge_port) - - self.delete_old_scenario = True - if access_point_data: - print(len(access_point_data)) - - for ap in range(len(access_point_data)): - print(access_point_data[ap]) - self.dut_name = access_point_data[ap]["model"] - print(self.dut_name) - self.ap_model = access_point_data[ap]["model"] - if "/" in access_point_data[ap]["version"]: - self.version = access_point_data[ap]["version"].split("/")[-1] - else: - self.version = " - " - self.serial = access_point_data[ap]["serial"] - self.ssid_data = None - if self.run_lf: - self.ssid_data = access_point_data[ap]['ssid'] - print(self.ssid_data) - - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name=self.dut_name, - sw_version=self.version, - hw_version=self.ap_model, - model_num=self.ap_model, - serial_num=self.serial - ) - self.CreateDut.ssid = [] - if self.ssid_data is not None: - self.twog_ssid = ["ssid_idx=0" - " ssid=" + self.ssid_data["2g-ssid"] + - " security=" + self.ssid_data["2g-encryption"].upper() + - " password=" + self.ssid_data["2g-password"] + - " bssid=" + self.ssid_data["2g-bssid"].lower().replace(" ", "") - ] - - self.fiveg_ssid = ["ssid_idx=1 ssid=" + - self.ssid_data["5g-ssid"] + - " security=" + - self.ssid_data["5g-encryption"].upper() + - " password=" + - self.ssid_data["5g-password"] + - " bssid=" + - self.ssid_data["5g-bssid"].lower().replace(" ", "")] - if "6g-ssid" in self.ssid_data.keys(): - print("yes") - self.sixg_ssid = ["ssid_idx=2 ssid=" + - self.ssid_data["6g-ssid"] + - " security=" + - self.ssid_data["6g-encryption"].upper() + - " password=" + - self.ssid_data["6g-password"] + - " bssid=" + - self.ssid_data["6g-bssid"].lower().replace(" ", "")] - ssid_var = [self.twog_ssid, self.fiveg_ssid, self.sixg_ssid] - else: - ssid_var = [self.twog_ssid, self.fiveg_ssid] - self.CreateDut.ssid = ssid_var - # print(self.CreateDut.ssid) - self.Create_Dut() - - if lanforge_data["type"] == "mesh": - self.lanforge_ip = lanforge_data["ip"] - self.lanforge_port = lanforge_data["port"] - self.ssh_port = lanforge_data["ssh_port"] - self.upstream_port_1 = lanforge_data["upstream-mobile-sta"] - self.upstream_port_2 = lanforge_data["upstream-root"] - self.upstream_port_3 = lanforge_data["upstream-node-1"] - self.upstream_port_4 = lanforge_data["upstream-node-2"] - self.uplink_port_1 = lanforge_data["uplink-mobile-sta"] - self.uplink_port_2 = lanforge_data["uplink-root"] - self.uplink_port_3 = lanforge_data["uplink--node-1"] - self.uplink_port_4 = lanforge_data["uplink--node-2"] - self.upstream_resource_1 = self.upstream_port_1.split(".")[0] + "." + self.upstream_port_1.split(".")[1] - self.upstream_resource_2 = self.upstream_port_2.split(".")[0] + "." + self.upstream_port_2.split(".")[1] - self.upstream_resource_3 = self.upstream_port_3.split(".")[0] + "." + self.upstream_port_3.split(".")[1] - self.upstream_resource_4 = self.upstream_port_4.split(".")[0] + "." + self.upstream_port_4.split(".")[1] - self.uplink_resource_1 = self.uplink_port_1.split(".")[0] + "." + self.uplink_port_1.split(".")[1] - self.uplink_resource_2 = self.uplink_port_2.split(".")[0] + "." + self.uplink_port_2.split(".")[1] - self.uplink_resource_3 = self.uplink_port_3.split(".")[0] + "." + self.uplink_port_3.split(".")[1] - self.uplink_resource_4 = self.uplink_port_4.split(".")[0] + "." + self.uplink_port_4.split(".")[1] - self.upstream_subnet = lanforge_data["upstream_subnet-mobile-sta"] - self.delete_old_scenario = True - self.debug = debug - self.testbed = "mesh" - self.scenario_name = "TIP-" + self.testbed - self.raw_line = [ - ["profile_link " + self.upstream_resource_1 + " upstream-dhcp 1 NA NA " + - self.upstream_port_1.split(".")[2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_1 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_1.split(".")[2] + "," + self.upstream_port_1.split(".")[2] + " -1 NA"] - ] - self.CreateChamberview = CreateChamberview(self.lanforge_ip, self.lanforge_port) - else: - self.lanforge_ip = lanforge_data["ip"] - self.lanforge_port = lanforge_data["port"] - self.twog_radios = lanforge_data["2.4G-Radio"] - self.fiveg_radios = lanforge_data["5G-Radio"] - self.ax_radios = lanforge_data["AX-Radio"] - self.upstream_port = lanforge_data["upstream"] - self.twog_prefix = lanforge_data["2.4G-Station-Name"] - self.fiveg_prefix = lanforge_data["5G-Station-Name"] - self.ax_prefix = lanforge_data["AX-Station-Name"] - self.uplink_port = lanforge_data["uplink"] # eth2 - self.upstream_subnet = lanforge_data["upstream_subnet"] - self.testbed = testbed - self.upstream_resources = self.upstream_port.split(".")[0] + "." + self.upstream_port.split(".")[1] - self.uplink_resources = self.uplink_port.split(".")[0] + "." + self.uplink_port.split(".")[1] - self.delete_old_scenario = True - # For chamber view - self.scenario_name = "TIP-" + self.testbed - self.debug = debug - self.exit_on_error = False - self.dut_idx_mapping = {} - self.ssid_list = [] - self.ap_version = ap_version - self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug) - self.raw_line = [ - ["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".") - [2] + ",AUTO -1 NA"], - ["profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet - + "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"] - ] - - # This is for rawline input | see create_chamberview_dut.py for more details - - self.CreateChamberview = CreateChamberview(self.lanforge_ip, self.lanforge_port) - - if access_point_data: - # for DUT - self.dut_name = testbed - self.ap_model = access_point_data[0]["model"] - self.ap_hw_info = access_point_data[0]["mode"] - if len(self.ap_version) >= 1 and "/" in self.ap_version[0]: - self.version = self.ap_version[0].split(" / ")[1].split("\r\n\n")[0] - print("AP version", self.version) - else: - self.version = " - " - self.serial = access_point_data[0]["serial"] - self.ssid_data = None - if self.run_lf: - self.ssid_data = access_point_data[0]['ssid'] - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name=self.testbed, - sw_version=self.version, - hw_version=self.ap_hw_info, - model_num=self.ap_model, - serial_num=self.serial - ) - self.CreateDut.ssid = [] - if self.ssid_data is not None: - # ssid = ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'] - # ssid = ["ssid_idx=" + str(interface) + - # " ssid=" + ssid_info_sdk[interface][0] + - # " security=" + ssid_info_sdk[interface][1].upper() + - # " password=" + ssid_info_sdk[interface][2] + - # " bssid=" + ssid_info_sdk[interface][4].lower() - # ] - self.twog_ssid = ["ssid_idx=0" - " ssid=" + self.ssid_data["2g-ssid"] + - " security=" + self.ssid_data["2g-encryption"].upper() + - " password=" + self.ssid_data["2g-password"] + - " bssid=" + self.ssid_data["2g-bssid"].lower().replace(" ", "") - ] - - self.fiveg_ssid = ["ssid_idx=1 ssid=" + - self.ssid_data["5g-ssid"] + - " security=" + - self.ssid_data["5g-encryption"].upper() + - " password=" + - self.ssid_data["5g-password"] + - " bssid=" + - self.ssid_data["5g-bssid"].lower().replace(" ", "")] - self.CreateDut.ssid = [self.twog_ssid, self.fiveg_ssid] - # print(self.CreateDut.ssid) - self.Create_Dut() - - def reset_scenario(self): - # self.layer3_cleanup() - # self.Create_Dut() - if not self.run_lf: - self.raw_line = [ - ["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".") - [2] + ",AUTO -1 NA"], - ["profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet - + "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"] - ] - print(self.raw_line) - self.Chamber_View() - - def reset_dut(self): - temp = [] - for i in range(0, 8): - temp.append(['ssid_idx=' + str(i) + ' ssid=-']) - print(temp) - self.CreateDut.ssid = temp - self.CreateDut.add_ssids() - - def get_station_list(self): - # realm_obj = self.staConnect.localrealm - sta = self.staConnect.station_list() - sta_list = [] - for i in sta: - for j in i: - sta_list.append(j) - return sta_list - - def admin_up_down(self, sta_list=[], option="up"): - # realm_obj = self.staConnect.localrealm - if option == "up": - for i in sta_list: - self.staConnect.admin_up(i) - time.sleep(0.005) - elif option == "down": - for j in sta_list: - self.staConnect.admin_down(j) - time.sleep(0.005) - time.sleep(2) - - def Chamber_View(self): - if self.delete_old_scenario: - self.CreateChamberview.clean_cv_scenario(scenario_name=self.scenario_name) - self.CreateChamberview.setup(create_scenario=self.scenario_name, - raw_line=self.raw_line - ) - self.CreateChamberview.build(self.scenario_name) - self.CreateChamberview.sync_cv() - time.sleep(2) - self.CreateChamberview.show_text_blob(None, None, True) # Show changes on GUI - self.CreateChamberview.sync_cv() - time.sleep(15) - return self.CreateChamberview, self.scenario_name - - def add_vlan(self, vlan_ids=[]): - data = self.staConnect.json_get("/port/all") - flag = 0 - for vlans in vlan_ids: - for i in data["interfaces"]: - if list(i.keys())[0] != self.upstream_port + "." + str(vlans): - flag = 1 - if flag == 1: - for vlans in vlan_ids: - self.raw_line.append(["profile_link " + self.upstream_resources + " vlan-100 1 " + self.upstream_port - + " NA " + self.upstream_port.split(".")[2] + ",AUTO -1 " + str(vlans)]) - self.Chamber_View() - - def add_stations(self, band="2G", num_stations="max", dut="NA", ssid_name=[], idx=0): - LOGGER.info("Adding Stations:" + band + " band, Number of Stations: " + str(num_stations) + - " DUT: " + str(dut) + " SSID: " + str(ssid_name) + " idx: " + str(idx)) - if num_stations == 0: - LOGGER.warning("0 Stations") - return - idx = idx - if self.run_lf or self.cc_1: - if band == "2G": - idx = 0 - if band == "5G": - idx = 1 - - - for i in self.dut_idx_mapping: - if self.dut_idx_mapping[i][0] == ssid_name and self.dut_idx_mapping[i][3] == band: - idx = i - if band == "2G": - if num_stations != "max": - LOGGER.info("Total 2G Radios Available in Testbed: " + str(len(self.twog_radios))) - total_sta = num_stations - max_possible = 0 - for radio in self.twog_radios: - max_possible = max_possible + int(self.get_max_sta(radio)) - if total_sta <= max_possible: - per_radio_sta = int(total_sta / len(self.twog_radios)) - rem = total_sta % len(self.twog_radios) - else: - total_sta = max_possible - per_radio_sta = int(total_sta / len(self.twog_radios)) - rem = total_sta % len(self.twog_radios) - if rem != 0 and per_radio_sta == 0: - per_radio_sta = rem / len(self.twog_radios) - LOGGER.info("Total stations per radio: " + str(per_radio_sta)) - for radio in self.twog_radios: - max_possible = int(self.get_max_sta(radio)) - if total_sta == 0: - return - num_stations = per_radio_sta - if rem == 0 and num_stations == 0: - return - if max_possible - num_stations >= rem: - num_stations = num_stations + rem - rem = 0 - elif max_possible - rem >= num_stations: - num_stations = num_stations + rem - rem = 0 - elif total_sta <= max_possible: - num_stations = total_sta - if per_radio_sta < 1: - num_stations = 1 - total_sta = total_sta - num_stations - LOGGER.info("Adding " + str(num_stations) + " Stations on " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - - if num_stations == "max": - LOGGER.info("Total 2G Radios Available in Testbed: " + str(len(self.twog_radios))) - for radio in self.twog_radios: - num_stations = self.get_max_sta(radio) - LOGGER.info("Total stations: " + str(num_stations) + " On Radio: " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - - if band == "5G": - if num_stations != "max": - LOGGER.info("Total 2G Radios Available in Testbed: " + str(len(self.fiveg_radios))) - total_sta = num_stations - max_possible = 0 - for radio in self.fiveg_radios: - max_possible = max_possible + int(self.get_max_sta(radio)) - if total_sta <= max_possible: - per_radio_sta = int(total_sta / len(self.fiveg_radios)) - rem = total_sta % len(self.fiveg_radios) - else: - total_sta = max_possible - per_radio_sta = int(total_sta / len(self.fiveg_radios)) - rem = total_sta % len(self.fiveg_radios) - if rem != 0 and per_radio_sta == 0: - per_radio_sta = rem / len(self.fiveg_radios) - LOGGER.info("Total stations per radio: " + str(per_radio_sta)) - for radio in self.fiveg_radios: - max_possible = int(self.get_max_sta(radio)) - if total_sta == 0: - return - num_stations = per_radio_sta - if rem == 0 and num_stations == 0: - return - if max_possible - num_stations >= rem: - num_stations = num_stations + rem - rem = 0 - elif max_possible - rem >= num_stations: - num_stations = num_stations + rem - rem = 0 - elif total_sta <= max_possible: - num_stations = total_sta - if per_radio_sta < 1: - num_stations = 1 - total_sta = total_sta - num_stations - LOGGER.info("Adding " + str(num_stations) + " Stations on " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - - if num_stations == "max": - LOGGER.info("Total 5G Radios Available in Testbed: " + str(len(self.fiveg_radios))) - for radio in self.fiveg_radios: - num_stations = self.get_max_sta(radio) - LOGGER.info("Total stations: " + str(num_stations) + " On Radio: " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - if band == "ax": - if num_stations != "max": - LOGGER.info("Total 2G Radios Available in Testbed: " + str(len(self.ax_radios))) - total_sta = num_stations - max_possible = 0 - for radio in self.ax_radios: - max_possible = max_possible + int(self.get_max_sta(radio)) - if total_sta <= max_possible: - per_radio_sta = int(total_sta / len(self.ax_radios)) - rem = total_sta % len(self.ax_radios) - else: - total_sta = max_possible - per_radio_sta = int(total_sta / len(self.ax_radios)) - rem = total_sta % len(self.ax_radios) - if rem != 0 and per_radio_sta == 0: - per_radio_sta = rem / len(self.ax_radios) - LOGGER.info("Total stations per radio: " + str(per_radio_sta)) - for radio in self.ax_radios: - max_possible = int(self.get_max_sta(radio)) - if total_sta == 0: - return - num_stations = per_radio_sta - if rem == 0 and num_stations == 0: - return - if max_possible - num_stations >= rem: - num_stations = num_stations + rem - rem = 0 - elif max_possible - rem >= num_stations: - num_stations = num_stations + rem - rem = 0 - elif total_sta <= max_possible: - num_stations = total_sta - if per_radio_sta < 1: - num_stations = 1 - total_sta = total_sta - num_stations - LOGGER.info("Adding " + str(num_stations) + " Stations on " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - if num_stations == "max": - LOGGER.info("Total AX Radios Available in Testbed: " + str(len(self.ax_radios))) - for radio in self.ax_radios: - num_stations = self.get_max_sta(radio) - LOGGER.info("Total stations: " + str(num_stations) + " On Radio: " + str(radio)) - station_data = ["profile_link " + radio.split(".")[0] + "." + radio.split(".")[1] + - " STA-AUTO " + str(num_stations) + " 'DUT: " + dut + " Radio-" + - str(int(idx) + 1) + "'" + " NA " + radio.split(".")[2]] - self.raw_line.append(station_data) - LOGGER.debug("Raw Line : " + str(station_data)) - - def Create_Dut(self): - self.CreateDut.setup() - self.CreateDut.add_ssids() - self.CreateDut.cv_test.show_text_blob(None, None, True) # Show changes on GUI - self.CreateDut.cv_test.sync_cv() - time.sleep(2) - self.CreateDut.cv_test.show_text_blob(None, None, True) # Show changes on GUI - self.CreateDut.cv_test.sync_cv() - return self.CreateDut, self.dut_name - - def update_ssid(self, ssid_data=[]): - self.CreateDut.ssid = ssid_data - self.CreateDut.add_ssids() - # SSID data should be in this format - # [ - # ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'], - # ['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59'] - # ] - pass - - def json_get(self, _req_url="/"): - cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, ) - json_response = cli_base.json_get(_req_url=_req_url) - return json_response - - def json_post(self, req_url, shelf, resources, port, current, intrest): - data = { - "shelf": shelf, - "resource": resources, - "port": port, - "current_flags": current, - "interest": intrest - } - cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, ) - return cli_base.json_post(req_url, data) - - def station_data_query(self, station_name="wlan0", query="channel"): - x = self.twog_radios[0].split(".") - url = f"/port/{x[0]}/{x[1]}/{station_name}?fields={query}" - print("url", url) - response = self.json_get(_req_url=url) - print("response: ", response) - if (response is None) or ("interface" not in response): - print("station_list: incomplete response:") - # pprint(response) - exit(1) - y = response["interface"][query] - return y - - def read_kpi_file(self, column_name, dir_name): - if column_name == None: - df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', engine='python') - if df.empty == True: - return "empty" - else: - return df - else: - df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', usecols=column_name, - engine='python') - if df.empty == True: - return "empty" - else: - result = df[column_name].values.tolist() - return result - - def read_csv_individual_station_throughput(self, dir_name, option, individual_station_throughput=True, kpi_csv=False, - file_name="/csv-data/data-Combined_bps__60_second_running_average-1.csv", - batch_size="0"): - try: - df = pd.read_csv( - "../reports/" + str(dir_name) + file_name, - sep=r'\t', engine='python') - print("csv file opened") - except FileNotFoundError: - print("csv file does not exist") - return False - - if kpi_csv: - count = 0 - dict_data = {"Down": {}, "Up": {}, "Both": {}} - csv_short_dis = df.loc[:,"short-description"] - csv_num_score = df.loc[:,"numeric-score"] - for i in range(len(batch_size.split(","))): - dict_data["Down"][csv_short_dis[count + 0]] = csv_num_score[count + 0] - dict_data["Up"][csv_short_dis[count + 1]] = csv_num_score[count + 1] - dict_data["Both"][csv_short_dis[count + 2]] = csv_num_score[count + 2] - count += 3 - - if individual_station_throughput: - dict_data = {} - if option == "download": - csv_sta_names = df.iloc[[0]].values.tolist() - csv_throughput_values = df.iloc[[1]].values.tolist() - elif option == "upload": - csv_sta_names = df.iloc[[0]].values.tolist() - csv_throughput_values = df.iloc[[2]].values.tolist() - else: - print("Provide proper option: download or upload") - return - - sta_list = csv_sta_names[0][0][:-1].replace('"', '').split(",") - th_list = list(map(float, csv_throughput_values[0][0].split(","))) - for i in range(len(sta_list)): - dict_data[sta_list[i]] = th_list[i] - - return dict_data - - def attach_report_kpi(self, report_name=None, file_name="kpi_file"): - path = "../reports/" + str(report_name) + "/kpi.csv" - if os.path.exists(path): - allure.attach.file(source=path, - name=file_name, attachment_type="CSV") - return os.path.exists(path) - - def attach_report_graphs(self, report_name=None, pdf_name="WIFI Capacity Test PDF Report"): - relevant_path = "../reports/" + report_name + "/" - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source=relevant_path + pdf, - name=pdf_name) - - included_extensions = ['png'] - file_names = [fn for fn in os.listdir(relevant_path) - if any(fn.endswith(ext) for ext in included_extensions)] - - a = [item for item in file_names if 'print' not in item] - a = [item for item in a if 'logo' not in item] - a = [item for item in a if 'Logo' not in item] - a = [item for item in a if 'candela' not in item] - - a.sort() - for i in a: - allure.attach.file(source=relevant_path + i, - name=i, - attachment_type="image/png", extension=None) - - def create_mesh_scenario(self): - # upstream_list = [] - # for data in range(0,len(self.access_point_data)): - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name="upstream") # + str(data)) - self.CreateDut.lan_port = "10.28.2.1/24" - # name = "upstream" + str(data) - # upstream_list.append(name) - - self.CreateDut.setup() - # data = data + 1 - self.raw_line = [ - ["profile_link " + self.upstream_resource_2 + " upstream-dhcp 1 NA NA " + self.upstream_port_2.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_2 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_2.split(".")[2] + "," + self.upstream_port_2.split(".")[2] + " -1 NA"], - ["profile_link " + self.upstream_resource_3 + " upstream-dhcp 1 NA NA " + self.upstream_port_3.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_3 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_3.split(".")[2] + "," + self.upstream_port_3.split(".")[2] + " -1 NA"], - ["profile_link " + self.upstream_resource_4 + " upstream-dhcp 1 NA NA " + self.upstream_port_4.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_4 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_4.split(".")[2] + "," + self.upstream_port_4.split(".")[2] + " -1 NA"] - ] - print(self.raw_line) - mesh = self.Chamber_View() - return mesh - - def create_mesh_scenario_dhcp_disable(self): - - # upstream_list = [] - # for data in range(0,len(self.access_point_data)): - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name="upstream") - self.CreateDut.lan_port = "10.28.2.1/24" - # name = "upstream" + str(data) - # upstream_list.append(name) - - self.CreateDut.setup() - # data = data + 1 - self.raw_line = [ - ["profile_link " + self.upstream_resource_2 + " upstream-dhcp 1 NA NA " + self.upstream_port_2.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_2 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_2.split(".")[2] + "," + self.upstream_port_2.split(".")[2] + " -1 NA"], - ["profile_link " + self.upstream_resource_3 + " upstream 1 NA NA " + self.upstream_port_3.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_3 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_3.split(".")[2] + "," + self.upstream_port_3.split(".")[2] + " -1 NA"], - ["profile_link " + self.upstream_resource_4 + " upstream 1 NA NA " + self.upstream_port_4.split(".")[ - 2] + ",AUTO -1 NA"], - [ - "profile_link " + self.uplink_resource_4 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + - self.uplink_port_4.split(".")[2] + "," + self.upstream_port_4.split(".")[2] + " -1 NA"] - ] - print(self.raw_line) - mesh = self.Chamber_View() - return mesh - - def create_mesh_dut(self, ssid_data=None): - print("hi ssid data", ssid_data) - for ap, ssid in zip(self.access_point_data, range(len(ssid_data))): - print("ap", ap) - print(ssid) - print(ssid_data[ssid]) - self.dut_name = "tip-" + str(ap["type"]) - print(self.dut_name) - self.ap_model = ap["model"] - if "/" in ap["version"]: - self.version = ap["version"].split("/")[-1] - else: - self.version=" - " - self.serial = ap["serial"] - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name=self.dut_name, - hw_version=self.ap_model, - model_num=self.ap_model, - serial_num=self.serial - ) - self.Create_Dut() - # [['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58']] - self.update_ssid(ssid_data=ssid_data[ssid]) - - - def create_non_meh_dut(self, ssid_data=[]): - # print("hi") - for ap, ssid in zip(self.access_point_data, range(len(ssid_data))): - print("ap", ap) - print(ssid_data[ssid]) - self.dut_name = ap["model"] - print(self.dut_name) - self.ap_model = ap["model"] - if "/" in ap["version"]: - self.version=ap["version"].split("/")[-1] - else: - self.version=" - " - self.serial = ap["serial"] - self.CreateDut = DUT(lfmgr=self.lanforge_ip, - port=self.lanforge_port, - dut_name=self.dut_name, - sw_version=self.version, - hw_version=self.ap_model, - model_num=self.ap_model, - serial_num=self.serial - ) - self.Create_Dut() - # [['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58']] - self.update_ssid(ssid_data=ssid_data[ssid]) - - - - def set_radio_antenna(self, req_url, shelf, resources, radio, antenna): - data = { - "shelf": shelf, - "resource": resources, - "radio": radio, - "antenna": antenna - } - cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, ) - return cli_base.json_post(req_url, data) - - def get_max_sta(self, radio=""): - data = self.json_get("/radiostatus/all") - return data[radio]["max_vifs"] - - -def main(): - # # lanforge_data = {'ip': 'localhost', 'port': 8802, 'ssh_port': 8804, '2.4G-Radio': ['1.1.wiphy0', '1.1.wiphy2'], '5G-Radio': ['1.1.wiphy1', '1.1.wiphy3'], 'AX-Radio': ['1.1.wiphy4', '1.1.wiphy5', '1.1.wiphy6', '1.1.wiphy7'], 'upstream': '1.1.eth2', 'upstream_subnet': '10.28.2.1/24', 'uplink': '1.1.eth1', '2.4G-Station-Name': 'sta00', '5G-Station-Name': 'sta10', 'AX-Station-Name': 'ax'} - # lanforge_data = { - # "type": "mesh", - # "ip": "localhost", # 10.28.3.14 - # "port": 8802, # 8080 - # "ssh_port": 8804, - # "2.4G-Radio-mobile-sta": ["1.1.wiphy0", "1.1.wiphy2"], - # "5G-Radio-mobile-sta": ["1.1.wiphy1", "1.1.wiphy3"], - # "AX-Radio-mobile-sta": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - # "upstream-mobile-sta": "1.1.eth2", - # "upstream_subnet-mobile-sta": "10.28.2.1/24", - # "uplink-mobile-sta": "1.1.eth3", - # "2.4G-Radio-root": ["1.2.wiphy0"], - # "5G-Radio-root": ["1.2.wiphy1"], - # "AX-Radio-root": [], - # "upstream-root": "1.2.eth2", - # "upstream_subnet-root": "10.28.2.1/24", - # "uplink-root": "1.2.eth3", - # "2.4G-Radio-node-1": ["1.3.wiphy0"], - # "5G-Radio-node-1": ["1.3.wiphy1"], - # "AX-Radio-node-1": [], - # "upstream-node-1": "1.3.eth2", - # "upstream_subnet-node-1": "10.28.2.1/24", - # "uplink--node-1": "1.3.eth3", - # "2.4G-Radio-node-2": ["1.4.wiphy0"], - # "5G-Radio-node-2": ["1.4.wiphy1"], - # "AX-Radio-node-2": [], - # "upstream-node-2": "1.4.eth2", - # "upstream_subnet-node-2": "10.28.2.1/24", - # "uplink--node-2": "1.4.eth3", - # "2.4G-Station-Name": "wlan0", - # "5G-Station-Name": "wlan0", - # "AX-Station-Name": "ax" - # } - # # ap_data = [{'model': 'wf188n', 'mode': 'wifi6', 'serial': '0000c1018812', 'jumphost': True, 'ip': 'localhost', 'username': 'lanforge', 'password': 'pumpkin77', 'port': 8803, 'jumphost_tty': '/dev/ttyAP1', 'version': 'https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/cig_wf188/20210729-cig_wf188-v2.0.0-rc2-ec3662e-upgrade.bin'}] - # ap_data = [ - # { - # 'type': 'root', - # 'model': 'eap101', - # 'mode': 'wifi6', - # 'serial': '34efb6af4a7a', - # 'jumphost': True, - # 'ip': "localhost", # 10\.28\.3\.101 - # 'username': "lanforge", - # 'password': "pumpkin77", - # 'port': 8803, # 22 - # 'jumphost_tty': '/dev/ttyAP2', - # 'version': "latest" - # }, - # { - # 'type': 'node-1', - # 'model': 'eap101', - # 'mode': 'wifi6', - # 'serial': '34efb6af4903', - # 'jumphost': True, - # 'ip': "localhost", # 10\.28\.3\.101 - # 'username': "lanforge", - # 'password': "pumpkin77", - # 'port': 8803, # 22 - # 'jumphost_tty': '/dev/ttyAP3', - # 'version': "latest" - # }, - # { - # 'type': 'node-2', - # 'model': 'eap102', - # 'mode': 'wifi6', - # 'serial': '34efb6af4a7a', - # 'jumphost': True, - # 'ip': "localhost", # 10\.28\.3\.101 - # 'username': "lanforge", - # 'password': "pumpkin77", - # 'port': 8803, # 22 - # 'jumphost_tty': '/dev/ttyAP4', - # 'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.1.0.tar.gz" - # } - # ] - # testbed = "mesh" - lanforge_data = { - "ip": "10.28.3.32", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2", "1.1.wiphy1"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "sta10", - "5G-Station-Name": "sta00", - "AX-Station-Name": "ax" - } - ap_data = [{ - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "903cb36ae223", - "jumphost": True, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP3", - "version": "release-latest" - }] - obj = ChamberView(lanforge_data=lanforge_data, access_point_data=ap_data, testbed="basic") - obj.add_stations("2G", "max", obj.dut_name, "abc") - # lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # obj.create_mesh_dut() - - -if __name__ == '__main__': - main() diff --git a/libs/lanforge/pull_report.py b/libs/lanforge/pull_report.py deleted file mode 100644 index c4ef5543a..000000000 --- a/libs/lanforge/pull_report.py +++ /dev/null @@ -1,21 +0,0 @@ -from tabulate import tabulate - -class Report: - def __init__(self, key1=None, - key2=None, - val1=None, - val2=None): - self.key1 = key1 - self.key2 = key2 - self.val1 = val1 - self.val2 = val2 - - def table1(self): - table ={str(self.key1): self.val1, str(self.key2):self.val2} - x = tabulate(table, headers="keys", tablefmt="fancy_grid") - return x - - def table2(self, table=None, headers='firstrow', tablefmt='fancy_grid'): - self.table = table - x = tabulate(self.table, headers=headers, tablefmt=tablefmt) - return x \ No newline at end of file diff --git a/libs/lanforge/scp_util.py b/libs/lanforge/scp_util.py deleted file mode 100755 index 3b2c53177..000000000 --- a/libs/lanforge/scp_util.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 -import argparse - -import paramiko -from scp import SCPClient - - -class SCP_File: - def __init__(self, ip="localhost", port=22, username="lanforge", password="lanforge", remote_path="/home/lanforge/", - local_path="."): - self.ip = ip - self.port = port - self.remote_path = remote_path - self.local_path = local_path - self.username = username - self.password = password - - def pull_file(self): - ssh = paramiko.SSHClient() - ssh.load_system_host_keys() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh.connect(hostname=self.ip, username=self.username, password=self.password, port=self.port, allow_agent=False, - look_for_keys=False) - # ssh.close() - - with SCPClient(ssh.get_transport()) as scp: - scp.get(remote_path=self.remote_path, local_path=self.local_path, recursive=True) - scp.close() - - -def main(): - parser = argparse.ArgumentParser(prog="lf_utils", - formatter_class=argparse.RawTextHelpFormatter, - allow_abbrev=True, - epilog="About lf_tools.py", - description="Tools for LANforge System") - parser.add_argument('--host', type=str, help=' --host : IP Address f LANforge System', default="localhost") - parser.add_argument('--port', type=int, help='--passwd of dut', default=22) - parser.add_argument('--username', type=str, help='--username to use on LANforge', default="lanforge") - parser.add_argument('--password', type=str, help='--password to use on LANforge', default="lanforge") - parser.add_argument('--remote_path', type=str, help='--password to the given username', - default="/home/lanforge/lf_kinstall.pl") - parser.add_argument('--local_path', type=str, help='--action to perform' - 'reboot | run_cmd', default=".") - args = parser.parse_args() - lf_tools = SCP_File(ip=args.host, port=args.port, - username=args.username, password=args.password, - remote_path=args.remote_path, local_path=args.local_path) - lf_tools.pull_file() - - - - -if __name__ == '__main__': - main() diff --git a/libs/network_connectivity/NetworkConnectivity.py b/libs/network_connectivity/NetworkConnectivity.py new file mode 100644 index 000000000..1787b27ff --- /dev/null +++ b/libs/network_connectivity/NetworkConnectivity.py @@ -0,0 +1,29 @@ +REMOTE_SERVER_IP = "3.130.51.163" +import subprocess +import time +import threading + + +class SshTunnel(threading.Thread): + def __init__(self, localport, remoteport, remoteuser, remotehost): + threading.Thread.__init__(self) + self.localport = localport # Local port to listen to + self.remoteport = remoteport # Remote port on remotehost + self.remoteuser = remoteuser # Remote user on remotehost + self.remotehost = remotehost # What host do we send traffic to + self.daemon = True # So that thread will exit when + # main non-daemon thread finishes + + def run(self): + a = subprocess.call([ + 'ssh', '-C', + '-L', str(self.localport) + ':' + "10.28.3.10" + ':' + str(self.remoteport), + self.remoteuser + '@' + self.remotehost]) + + + +if __name__ == '__main__': + tunnel = SshTunnel(8800, 8080, 'ubuntu', REMOTE_SERVER_IP) + tunnel.start() + tunnel.join() + # subprocess.call(['curl', 'http://10.28.3.10:8800']) diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/__init__.py b/libs/network_connectivity/__init__.py similarity index 100% rename from tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/__init__.py rename to libs/network_connectivity/__init__.py diff --git a/libs/perfecto_libs/README.md b/libs/perfecto_interop/README.md similarity index 100% rename from libs/perfecto_libs/README.md rename to libs/perfecto_interop/README.md diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/__init__.py b/libs/perfecto_interop/__init__.py similarity index 100% rename from tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/__init__.py rename to libs/perfecto_interop/__init__.py diff --git a/libs/perfecto_interop/android_libs.py b/libs/perfecto_interop/android_libs.py new file mode 100644 index 000000000..ad4e2e524 --- /dev/null +++ b/libs/perfecto_interop/android_libs.py @@ -0,0 +1,3001 @@ +""" +This file contains the functions that are required for Perfecto Android devices +""" +import logging +import os +import re +import time +import warnings +from time import gmtime, strftime +import allure +import pytest +import requests +import urllib3 +from appium import webdriver +from appium.webdriver import webdriver +from appium.webdriver.common.mobileby import MobileBy +from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient, TestContext) +from perfecto.model.model import Job, Project +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from xml.etree import ElementTree as ET + + +class android_libs: + global driver, perfecto_execution_context, deviceModel + android_devices = { + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + }, + "Galaxy S10.*": { + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10", + "jobNumber": 38 + }, + "Galaxy S9": { + "platformName-android": "Android", + "model-android": "Galaxy S9", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S9", + "jobNumber": 38 + }, + "Pixel 4": { + "platformName-android": "Android", + "model-android": "Pixel 4", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-pixel-4", + "jobNumber": 38 + } + } + ios_devices = { + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + }, + "iPhone-12": { + "model-iOS": "iPhone-12", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-12", + "jobNumber": 38 + }, + "iPhone-7": { + "model-iOS": "iPhone-7", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-7", + "jobNumber": 38 + }, + "iPhone-XR": { + "model-iOS": "iPhone-XR", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-XR", + "jobNumber": 38 + } + } + def __init__(self, perfecto_data=None, dut_data=None, testcase=None): + logging_level = logging.INFO + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging_level) + # super().__init__(perfecto_data=perfecto_data, dut_data=dut_data) + self.perfecto_data = perfecto_data + self.dut_data = dut_data + self.testcase_name = testcase + self.connData = self.get_ToggleAirplaneMode_data() + print("connData------", self.connData) + pass + + # Checks if there is any Popup on device and tries to kill the Popup and returns false if the Popup is not killed + def check_if_no_internet_popup(self, driver): + time.sleep(1) + driver.implicitly_wait(1) + try: + + popup = driver.find_element_by_xpath("//*[@resource-id='android:id/alertTitle']") + popup_text = popup.text + + try: + if popup_text == "Internet may not be available": + print("**alert** popup **alert**") + + try: + driver.implicitly_wait(2) + time.sleep(2) + kill_popup = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/keep_btn']") + kill_popup.click() + print("popup killed") + except: + print("Couldnt kill popup") + logging.warning("Couldn't kill popup") + return False + else: + print("Popup Text is: ", popup_text) + print("popup element is: ", popup) + return False + except: + print("Popup Text is: ", popup_text) + print("popup element is: ", popup) + return False + except: + pass + + # Checks the Available SSIDS on device and return them in the form of List + def get_all_available_ssids(self, driver, deviceModelName): + active_ssid_list = [] + print("Selected Device Model: " + deviceModelName) + if deviceModelName != ("Pixel 4"): + try: + time.sleep(8) + driver.implicitly_wait(10) + elements = driver.find_elements_by_xpath("//*[@resource-id='com.android.settings:id/title']") + # print("elements: ", elements) + print(len(elements)) + for i in range(len(elements)): + # print("elements[i]", elements[i]) + # print("elements[i].text", elements[i].text) + active_ssid_list.append(elements[i].text) + except: + print("No SSIDS available") + else: + try: + time.sleep(8) + driver.implicitly_wait(10) + elements = driver.find_elements_by_xpath("//*[@resource-id='android:id/title']") + # print("elements: ", elements) + print(len(elements)) + for i in range(len(elements)): + # print("elements[i]", elements[i]) + # print("elements[i].text", elements[i].text) + try: + active_ssid_list.append(elements[i].text) + except: + print("Encountered a cache SSID which is no longer in the DOM.Moving to next SSID.") + logging.warning("Encountered a cache SSID which is no longer in the DOM.Moving to next SSID") + except: + print("No SSIDS available") + logging.error("No SSIDS available") + return active_ssid_list + + # Opens an APP on the device based on the argument given + def openApp(self, appName, setup_perfectoMobile): + print("Refreshing App: " + appName) + setup_perfectoMobile[1].step_start("Opening App: " + appName) + params = {'identifier': appName} + # Open/Close/Open Action is performed to ensure the app is back to its Original Settings + setup_perfectoMobile[0].execute_script('mobile:application:open', params) + setup_perfectoMobile[0].execute_script('mobile:application:close', params) + setup_perfectoMobile[0].execute_script('mobile:application:open', params) + + # Closes an APP on the device based on the argument given + def closeApp(self, appName, setup_perfectoMobile): + print("Closing App.." + appName) + setup_perfectoMobile[1].step_start("Closing App: " + appName) + params = {'identifier': appName} + setup_perfectoMobile[0].execute_script('mobile:application:close', params) + print("Closed App") + + # Tries to swipe the screen on the device based on the Params given + def scrollDown(self, setup_perfectoMobile): + print("Scroll Down") + setup_perfectoMobile[1].step_start("Scroll Down") + params2 = {} + params2["start"] = "50%,90%" + params2["end"] = "50%,20%" + params2["duration"] = "4" + # time.sleep(2) + setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) + time.sleep(3) + + # Tries to swipe the screen on the device based on the Params given specially created for Pixel Phone + def scroll_down_pixel(self, setup_perfectoMobile): + print("Scroll Down") + setup_perfectoMobile[1].step_start("Scroll Down") + params2 = {} + params2["start"] = "50%,50%" + params2["end"] = "50%,20%" + params2["duration"] = "4" + time.sleep(2) + setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) + time.sleep(1) + + # Tries to swipe the screen on the device based on the Params given + def scroll_up(self, setup_perfectoMobile): + print("Scroll up") + setup_perfectoMobile[1].step_start("Scroll up") + params2 = {} + params2["start"] = "50%,20%" + params2["end"] = "50%,80%" + params2["duration"] = "2" + time.sleep(1) + setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) + time.sleep(1) + + # Returns the Device id + def getDeviceID(self, setup_perfectoMobile): + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Get DeviceID") + params = {'property': 'deviceId'} + deviceID = driver.execute_script('mobile:handset:info', params) + print("DeviceID: " + deviceID) + return deviceID + + # Returns the Device Model + def getDeviceModelName(self, setup_perfectoMobile): + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Device Model Name") + params = {'property': 'model'} + deviceModel = driver.execute_script('mobile:handset:info', params) + print("ModelName: " + deviceModel) + return deviceModel + + # Returns the device info mostly used for OS version in this case + def get_phone_information(self, setup_perfectoMobile, search_this): + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Get DeviceID") + params = {'property': search_this} + device_information = driver.execute_script('mobile:handset:info', params) + print("device information for " + search_this + " is: ", device_information) + return device_information + + # Returns the Data needed for the Device + def get_ToggleAirplaneMode_data(self, get_device_configuration): + + passPoint_data = { + "webURL": "https://www.google.com", + "lblSearch": "//*[@class='gLFyf']", + "elelSearch": "(//*[@class='sbic sb43'])[1]", + "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", + "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], + "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", + "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", + # Android + "platformName-android": get_device_configuration["platformName-android"], + "appPackage-android": get_device_configuration["appPackage-android"] + } + return passPoint_data + + def report_client(self, value): + global reporting_client # declare a to be a global + reporting_client = value # this sets the global value of a + + def reportPerfecto(testCaseName, testCaseStatus, testErrorMsg, reportURL): + global testCaseNameList # declare a to be a global + global testCaseStatusList + global testCaseErrorMsg + global testCaseReportURL + + testCaseNameList.append(testCaseName) + testCaseStatusList.append(testCaseStatus) + testCaseErrorMsg.append(str(testErrorMsg)) + testCaseReportURL.append(reportURL) + + # Gets the Device response from Perfecto + def response_device(self, model): + securityToken = self.perfecto_data["securityToken"] + perfectoURL = self.perfecto_data["perfectoURL"] + url = f"https://{perfectoURL}.perfectomobile.com/services/handsets?operation=list&securityToken={securityToken}&model={model}" + resp = requests.get(url=url) + return ET.fromstring(resp.content) + + def get_attribute_device(self, responseXml, attribute): + try: + return responseXml.find('handset').find(attribute).text + except: + print(f"Unable to get value of {attribute} from response") + return "" + + # Checks to see if a particular handset is available + def is_device_available(self, model): + try: + responseXml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + device_available = self.get_attribute_device(responseXml, 'available') + print("Result:" + device_available) + if device_available == 'true': + return True + else: + allocated_to = self.get_attribute_device(responseXml, 'allocatedTo') + print("The device is currently allocated to:" + allocated_to) + return False + + # Checks whether the device is available or not.If the device is not available rechecks depending upon the + # 'timerValue' and 'timerThreshold' values.With the current parameters it will check after:10,20,40,80 mins. + def is_device_Available_timeout(self, model): + device_available = self.is_device_available(model) + timer_value = 5 + timer_threshold = 80 + if not device_available: + while timer_value <= timer_threshold: + print("Last checked at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + print(f"Waiting for: {timer_value} min(s)") + time.sleep(timer_value * 60) + print("Checking now at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + device_available = self.is_device_available(model) + if device_available: + return True + else: + timer_value = timer_value + 5 + + if timer_value > timer_threshold: + return False + else: + return True + else: + return True + + def get_device_attribuites(self, model, attribute): + try: + responseXml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + try: + attribute_value = self.get_attribute_device(responseXml, str(attribute)) + except: + attribute_value = False + return attribute_value + + # Used to get the Android Device driver obj for further utility,Base function for Android Tests + def setup_perfectoMobile_android(self, get_device_configuration, perfecto_data): + from appium import webdriver + global perfecto_execution_context, driver, deviceModel + driver = None + reporting_client = None + print("Device CONFIG:", get_device_configuration) + print("Perfect data:", perfecto_data) + warnings.simplefilter("ignore", ResourceWarning) + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + capabilities = { + 'platformName': get_device_configuration["platformName-android"], + 'model': get_device_configuration["model-android"], + 'browserName': 'mobileOS', + # 'automationName' : 'Appium', + 'securityToken': perfecto_data["securityToken"], + 'useAppiumForWeb': 'false', + 'useAppiumForHybrid': 'false', + # 'bundleId' : request.config.getini("appPackage-android"), + } + + if not self.is_device_Available_timeout(capabilities['model']): + print("Unable to get device.") + pytest.exit("Exiting Pytest") + driver = webdriver.Remote( + 'https://' + perfecto_data["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', + capabilities) + driver.implicitly_wait(2) + if os.environ.get('PYTEST_CURRENT_TEST') is not None: + TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0] + nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName) + else: + nCurrentTestMethodNameSplit = self.testcase_name + try: + # TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_') + testcase = nCurrentTestMethodNameSplit.replace('test_', '') + print("\n\nExecuting TestCase: " + testcase) + except Exception as e: + testcase = nCurrentTestMethodNameSplit + print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL") + # print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/") + + projectname = perfecto_data["projectName"] + projectversion = perfecto_data["projectVersion"] + jobname = get_device_configuration["jobName"] + jobnumber = get_device_configuration["jobNumber"] + tags = perfecto_data["reportTags"] + test_case_name = testcase + print("-----------------------------------------------") + print(projectname, projectversion, jobnumber, jobname, tags) + print("-----------------------------------------------") + # print("\nSetting Perfecto ReportClient....") + perfecto_execution_context = PerfectoExecutionContext(driver, tags, Job(jobname, jobnumber), + Project(projectname, projectversion)) + reporting_client = PerfectoReportiumClient(perfecto_execution_context) + reporting_client.test_start(test_case_name, TestContext([], "Perforce")) + self.report_client(reporting_client) + + try: + params = {'property': 'model'} + deviceModel = driver.execute_script('mobile:handset:info', params) + except: + pass + + # request.addfinalizer(teardown) + + if driver is None: + yield -1 + else: + yield driver, reporting_client + + # Teardown function used to release all the data that presently hold from Perfecto + def teardown(self): + global driver, perfecto_execution_context, deviceModel + reporting_client = PerfectoReportiumClient(perfecto_execution_context) + try: + print("\n---------- Tear Down ----------") + try: + params = {'property': 'model'} + deviceModel = driver.execute_script('mobile:handset:info', params) + allure.dynamic.link( + str(reporting_client.report_url()), + name=str(deviceModel)) + except: + print("fail to attach video link") + + print('Report-Url: ' + reporting_client.report_url()) + + print("----------------------------------------------------------\n\n\n\n") + driver.close() + except Exception as e: + print(" -- Exception While Tear Down --") + driver.close() + print(e) + finally: + try: + driver.quit() + except Exception as e: + print(" -- Exception Not Able To Quit --") + print(e) + + # Runs Speed test on OOKla Speed test App on Android devices, OOKLA app should be present on the Device + def speed_test(self, setup_perfectoMobile): + driver = setup_perfectoMobile[0] + driver.switch_to.context('NATIVE_APP') + self.openApp('org.zwanoo.android.speedtest', setup_perfectoMobile) + WebDriverWait(driver, 30).until( + EC.presence_of_element_located( + (MobileBy.XPATH, "//*[@resource-id='org.zwanoo.android.speedtest:id/go_button']"))).click() + # Wait untill 2 minutes for the test to complete + WebDriverWait(driver, 120).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Test Again']"))) + downloadSpeed = driver.find_element_by_xpath("//*[@text='DOWNLOAD']/parent::*/android.widget.TextView[3]").text + uploadSpeed = driver.find_element_by_xpath("//*[@text='UPLOAD']/parent::*/android.widget.TextView[3]").text + print(f"Download speed: {downloadSpeed}") + print(f"Upload speed: {uploadSpeed}") + return downloadSpeed, uploadSpeed + + # Function used to connect to a particular SSID + def wifi_connect(self, ssid, passkey, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/AccessPoint Connection") + print("-------------------------------------") + print("Verifying Wifi Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + # ip_address_element_text = False + ssid_with_internet = False + wifi_name = ssid + ssid_found = False + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + contexts = driver.contexts + driver.switch_to.context(contexts[0]) + + # Open Settings Application + self.openApp(connData["appPackage-android"], setup_perfectoMobile) + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + + if device_model_name != "Pixel 4": + logging.info("Selected Model is not Pixel 4") + report.step_start("Set Wifi Network to " + wifi_name) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + logging.info("Verifying Connected Wifi Connection") + report.step_start("Click Connections") + conn_element = driver.find_element_by_xpath("//*[@text='Connections']") + conn_element.click() + + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + logging.info("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi-Fi']"))) + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + print("get_switch_text: ", get_switch_text) + print("Find wifi switch") + logging.info("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if get_switch_text == "Off": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if get_switch_text == "On": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + except: + pass + print("Sleeping for: ", i) + time.sleep(i) + pass + if get_switch_text == "Off": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile + else: + print("Switch is already On") + logging.info("Switch is already On") + # self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + logging.error("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile + except: + print("No Switch element found") + logging.error("No Switch element found") + # ---------------------This is to Forget current connected SSID------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + print("Trying to forget already connected ssid in Device OS-version=!12") + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_network_category']") + try: # To forget existing ssid + print("To forget ssid") + logging.info("To forget ssid") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//" + "*[@resource-id='com.android.settings:id/icon']") + forget_ssid.click() + print("Forget old ssid") + logging.info("Forget old ssid") + except: + print("Couldn't forget ssid") + logging.error("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile + except: + print("Couldn't get into additional details") + logging.error("Couldn't get into additional details") + except: + print("No Connected SSIDS") + logging.warning("No Connected SSIDS") + else: + print("Trying to forget already connected ssid in Device OS-version=12") + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_list']/android.widget." + "LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]" + "/android.widget.RelativeLayout[2]") + try: # To forget existing ssid + print("To forget ssid in OS-Version 12") + logging.info("To forget ssid in OS-Version 12") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/wifi_details']") + additional_details_element.click() + try: + print("To forget ssid in OS-Version 12") + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//" + "*[@resource-id='com.android.settings:id/navigation_bar_item_icon_view']") + forget_ssid.click() + print("Forgot old ssid") + logging.info("Forgot old ssid") + except: + print("Couldn't forget ssid") + logging.error("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile + except: + print("Couldn't get into additional details") + logging.error("Couldn't get into additional details") + except: + print("No Connected SSIDS") + logging.warning("No Connected SSIDS") + # ----------------------This is to Forget current connected SSID-------------------------------- + + # time.sleep(2) + print("Selecting Wifi: " + wifi_name) + logging.info("Selecting SSID") + # allure.attach(name= body=str("Selecting Wifi: " + wifi_name)) + available_ssids = False + # This is To get all available ssids + # ------------------------------------------------------ + try: + for k in range(6): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + logging.info("Available Ssids:" + str(available_ssids)) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if wifi_name not in available_ssids: + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(wifi_name + " : Found in Device") + # allure.attach(name= body=str(wifi_name+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + logging.error("couldn't find wifi in available ssid") + if not ssid_found: + print("could not found " + str(wifi_name) + " in device") + logging.error("Couldn't find the SSID") + # allure.attach(name= body=str("could not found" + wifi_name + " in device")) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found, + # ------------------------------------------------------- + + # Selecting WIFI + # ------------------------------------------------------- + try: + report.step_start("Selecting Wifi: " + wifi_name) + print("Clicking WIFI") + logging.info("Clicking SSID") + wifi_selection_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifi_selection_element.click() + self.check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + logging.error("Exception on Selecting Wifi Network. Please check wifi Name or signal") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + # Set password if Needed + # ------------------------------------------------------- + try: + self.check_if_no_internet_popup(driver) + time.sleep(3) + report.step_start("Set Wifi Password") + print("Set Wifi password") + logging.info("Set Wifi password") + passkeywordElement = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/edittext']") + passkeywordElement.send_keys(passkey) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + logging.error("Password Page Not Loaded, password May be cached in the System") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Click on connect button + # ------------------------------------------------------- + try: + time.sleep(5) + report.step_start("Click Connect Button") + print("Click Connect") + logging.info("Click Connect") + joinBTNElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Connect']"))) + joinBTNElement.click() + except NoSuchElementException: + print("Connect Button Not Enabled...Verify if Password is set properly") + logging.error("Connect Button Not Enabled...Verify if Password is set properly") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Verify if WiFi is connected + # ------------------------------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + try: + report.step_start("Verify if Wifi is Connected") + logging.info("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + logging.info("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + self.check_if_no_internet_popup(driver) + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id" + "/summary' and @text='Connected without internet']" + "/parent::*/android.widget.TextView[@text='" + + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + logging.info("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected - 2") + WifiInternetErrMsg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and " + "@text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + logging.info("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + logging.error("Wifi Connection Error") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + else: + try: + report.step_start( + "Verifying wifi connection status connected/connected without internet") + self.check_if_no_internet_popup(driver) + self.check_if_no_internet_popup(driver) + + wifi_connection_name = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings" + ":id/connected_list']/android.widget.LinearLayout[1]" + "/android.widget.LinearLayout[1]/android.widget." + "LinearLayout[1]/android.widget.RelativeLayout[2]/" + "android.widget.TextView[1]" + ))) + if wifi_connection_name.text == wifi_name: + wifi_connection_status = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary']" + ))) + if wifi_connection_status.text == "Connected": + ssid_with_internet = True + print("Connected with internet") + logging.info("Connected with internet") + + else: + ssid_with_internet = False + print("Wifi Successfully Connected without internet") + logging.info("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + # Go into additional details here + else: + # Connected to some other wifi, makes sense to close app and fail this testcase + logging.error("Connected to some other wifi") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except: + print("Couldn't find wifi Button") + logging.error("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + logging.error("Exception: Verify Xpath - Update/check Xpath for Click Connections") + # -----------------To Open Connections page--------------------------- + # --------------------Pixel 4 code--------------------------- + else: + report.step_start("Set Wifi Network to " + wifi_name) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + report.step_start("Click Network & internet in pixel4") + conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") + conn_element.click() + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + get_switch_text = get_switch_text_element.text + # if get_switch_text is not None: + # switch_text = "OFF" + # else: + # switch_text = "ON" + switch_text = get_switch_text + print("get_switch_text: ", switch_text) + print("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if switch_text == "OFF": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if switch_text == "ON": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@text='Add network']") + get_switch_text = get_switch_text_element.text + if get_switch_text == "Add network": + switch_text = "ON" + else: + switch_text = "OFF" + except NoSuchElementException: + print("Exception: Verify Xpath") + # Scroll Down + self.scrollDown(setup_perfectoMobile) + print("Sleeping for: ", i) + time.sleep(i) + pass + if switch_text == "OFF": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + else: + print("Switch is already On") + self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + + # ---------------------This is to Forget current connected SSID------------------------------- + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath("//*[@text='Connected']") + try: # To forget existing ssid + print("To forget ssid") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/settings_button_no_background']") + additional_details_element.click() + except: + print("Couldn't get into additional details") + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/button1']") + forget_ssid.click() + print("Forget old ssid") + except: + print("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + print("No Connected SSIDS") + # ----------------------This is to Forget current connected SSID-------------------------------- + + time.sleep(2) + print("Selecting Wifi: " + wifi_name) + # allure.attach(name= body=str("Selecting Wifi: " + wifi_name)) + ssid_found = False + available_ssids = False + # This is To get all available ssids + # ------------------------------------------------------ + try: + for k in range(5): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if wifi_name not in available_ssids: + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(wifi_name + " : Found in Device") + # allure.attach(name= body=str(wifi_name+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + if not ssid_found: + ssid_not_found = False + for k in range(5): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if wifi_name not in available_ssids: + self.scroll_up(driver) + time.sleep(2) + else: + ssid_not_found = True + print(wifi_name + " : Found in Device") + # allure.attach(name= body=str(wifi_name+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + if not ssid_not_found: + print("could not found " + wifi_name + " in device") + # allure.attach(name= body=str("could not found" + wifi_name + " in device")) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + + # Selecting WIFI + # ------------------------------------------------------- + try: + report.step_start("Selecting Wifi: " + wifi_name) + wifi_selection_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifi_selection_element.click() + self.check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + + # Set password if Needed + # ------------------------------------------------------- + try: + time.sleep(3) + self.check_if_no_internet_popup(driver) + report.step_start("Set Wifi Password") + print("Entering password") + passkeywordElement = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/password']") + passkeywordElement.send_keys(passkey) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Click on connect button + # ------------------------------------------------------- + try: + report.step_start("Click Connect Button") + time.sleep(5) + joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") + joinBTNElement.click() + except NoSuchElementException: + print("Connect Button Not Enabled...Verify if Password is set properly ") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Verify if WiFi is connected + # ------------------------------------------------------- + try: + report.step_start("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + print("Not able to verify the connected WiFi. Scrolling up.") + self.scroll_up(driver) + self.scroll_up(driver) + # self.check_if_no_internet_popup(driver) + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected") + print("Verifying after scrolling") + self.scroll_up(driver) + WifiInternetErrMsg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + except: + print("No Switch element found") + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except: + print("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + # -----------------To Open Connections page--------------------------- + + # self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + def get_ip_address(self, ssid, setup_perfectoMobile, connData): + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + print("----------Get IP Address---------------") + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + + if device_model_name != "Pixel 4": + logging.info("Selected Model is not Pixel 4") + report.step_start("Getting IP address") + # Get into Additional Details + # To Get an IP Address + # ------------------------------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + try: + print("Into additional details") + logging.info("Into additional details") + time.sleep(2) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + try: + time.sleep(2) + ip_address_ele = driver.find_element_by_xpath( + "//*[@text='IP address']/parent::*/android.widget." + "TextView[@resource-id='com.android.settings:id/summary']") + ip_address_ele_text = ip_address_ele.text + print("Device IP address is :", ip_address_ele_text) + return ip_address_ele_text + except: + try: + time.sleep(2) + ip_address_element = driver.find_element_by_xpath( + "//*[@text='IP address']/parent::*/android.widget." + "TextView[@resource-id='android:id/summary']") + ip_address_element_text = ip_address_element.text + print("Device IP address is :", ip_address_element_text) + return ip_address_element_text + except: + print("IP address element not found") + logging.error("IP address element not found") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + assert False + # --------------------Added for ssid security check-------------------------- + try: + time.sleep(2) + security_name_element = driver.find_element_by_xpath( + "//*[@text='Security']/parent::*/android.widget." + "TextView[@resource-id='com.android.settings:id/summary']") + security_name_element_text = security_name_element.text + print("Ssid security is :", security_name_element_text) + allure.attach(name="Ssid Security:", body=str(security_name_element_text)) + except: + print("Security is not available") + logging.error("Security is not available") + # --------------------Added for ssid Name check-------------------------- + try: + time.sleep(2) + ssid_name_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/entity_header_title']") + ssid_name_element_text = ssid_name_element.text + print("Ssid Name is :", ssid_name_element_text) + allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) + except: + print("Ssid name not available") + logging.error("Ssid name not available") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + assert False + if ssid_name_element_text == ssid: + print("Wifi is connected to the expected ssid") + logging.info("Wifi is connected to the expected ssid") + else: + print("Wifi is not connected to the expected ssid") + logging.error("Wifi is not connected to the expected ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + assert False + try: + self.check_if_no_internet_popup(driver) + driver.implicitly_wait(3) + time.sleep(2) + auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") + auto_reconnect_off_text = auto_reconnect_off.text + if auto_reconnect_off_text != "Off": + auto_reconnect_off.click() + print("Auto reconnect turning off") + logging.info("Auto reconnect turning off") + else: + print("Auto reconnect is already off") + logging.info("Auto reconnect is already off") + except: + print("Couldn't find auto reconnect element") + logging.error("Couldn't find auto reconnect element") + + # ------------------------------- Forget SSID ---------------- + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//" + "*[@resource-id='com.android.settings:id/icon']") + forget_ssid.click() + print("Forgetting ssid") + logging.info("Forgetting ssid") + except: + print("Couldn't forget ssid") + logging.error("Couldn't forget ssid") + except: + print("Couldn't get into Additional settings") + logging.error("Couldn't get into Additional settings") + # ------------------------------------------------------- + else: + try: + print("Into additional details") + logging.info("Into additional details") + time.sleep(2) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/wifi_details']") + additional_details_element.click() + + try: + print("click on view more") + logging.info("click on view more") + additional_details_element = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) + additional_details_element.click() + except: + pass + + try: + time.sleep(2) + ssid_name_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/entity_header_title']") + ssid_name_element_text = ssid_name_element.text + print("Ssid Name is :", ssid_name_element_text) + allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) + except: + print("Ssid name not available") + logging.error("Ssid name not available") + pass + + if (ssid_name_element_text == ssid): + print("Wifi is connected to the expected ssid") + logging.info("Wifi is connected to the expected ssid") + ip_address_element_text = "SSID Match, S20 Does Not support scrolling" + ssid_with_internet = "SSID Match, S20 Does Not support scrolling" + # return ssid_with_internet + else: + print("Wifi is not connected to the expected ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + report.step_start("Scrolling for ip address - 1") + # if device_model_name == "Galaxy S20": + # print("Scrolling for S20") + driver.swipe(470, 1400, 470, 1000, 400) + # else: + # self.scrollDown(driver) + + report.step_start("Scrolling for ip address - 2") + # if device_model_name == "Galaxy S20": + # print("Scrolling for S20") + driver.swipe(470, 1400, 470, 1000, 400) + # else: + # self.scrollDown(driver) + + report.step_start("Scrolling for ip address - 3") + # if device_model_name == "Galaxy S20": + # print("Scrolling for S20") + driver.swipe(470, 1400, 470, 1000, 400) + # else: + # self.scrollDown(driver) + report.step_start("looking for ip address") + + try: + ip_address_element_text = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/recycler_view']/" + "android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/" + "android.widget.TextView[2]") + ip_address_element_text = ip_address_element_text.text + print("IP Address:", ip_address_element_text) + return ip_address_element_text + + except: + print("Unable to get IP address") + logging.error("Unable to get IP address") + return None + except: + print("Couldn't get into Additional settings") + logging.error("Couldn't get into Additional settings") + # ------------------------------------------------------- + # ----------------Pixel 4 code------------ + else: + # ------------------------------------------------------- + + # Get into Additional Details + # To Get an IP Address + # ------------------------------------------------------- + try: + print("Into additional details") + time.sleep(5) + report.step_start("Going for ip address") + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/settings_button_no_background']") + additional_details_element.click() + print("Entered ssid") + try: + time.sleep(10) + print("clicking Advanced") + report.step_start("clicking Advanced") + advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") + advanced_element.click() + print("clicked Advanced") + # print("Device IP address is :", ip_address_element_text) + except: + try: + time.sleep(5) + print("clicking Advanced2") + advanced_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget." + "FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") + advanced_element.click() + # print("Device IP address is :", ip_address_element_text) + except: + try: + time.sleep(5) + print("clicking Advanced2") + advanced_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget." + "LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") + advanced_element.click() + except: + print("No advanced options") + # Scroll Down + self.scrollDown(setup_perfectoMobile) + # report.step_start("Scroll Down") + # for i in range(4): + # print("Scrolling...", i) + # try: + # value = driver.find_element_by_xpath("//*[@text='IP address']").is_displayed() + # if value is True: + # break + # except: + # print("Scrolling started...") + # driver.swipe(470, 1400, 470, 1000, 400) + # driver.implicitly_wait(2) + # continue + try: + time.sleep(2) + ip_address_element = driver.find_element_by_xpath( + "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") + ip_address_element_text = ip_address_element.text + print("Device IP address is :", ip_address_element_text) + return ip_address_element_text + except: + print("IP address element not found") + return None + except: + print("Couldn't get into Additional settings") + + def wifi_disconnect(self, ssid, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("WIFI Disconnect") + print("-------------------------------------") + # allure.attach(name= body=str("------------------- WIFI Disconnect ------------------")) + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + contexts = driver.contexts + driver.switch_to.context(contexts[0]) + + # Open Settings Application + self.openApp(connData["appPackage-android"], setup_perfectoMobile) + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + + if device_model_name != "Pixel 4": + report.step_start("Set Wifi Network to " + ssid) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + report.step_start("Click Connections") + conn_element = driver.find_element_by_xpath("//*[@text='Connections']") + conn_element.click() + + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + wifi_element = driver.find_element_by_xpath("//*[@text='Wi-Fi']") + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + print("get_switch_text: ", get_switch_text) + print("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if get_switch_text == "Off": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if get_switch_text == "On": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + except: + pass + print("Sleeping for: ", i) + time.sleep(i) + pass + if get_switch_text == "Off": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + else: + print("Switch is already On") + self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + # ---------------------This is to Forget current connected SSID------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_network_category']") + try: # To forget exhisting ssid + print("To forget ssid") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") + forget_ssid.click() + print("Forget old ssid") + # allure.attach(name=body=str("Forget old ssid")) + except: + print("Couldn't forget ssid") + # allure.attach(name=body=str("Couldn't forget ssid")) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + except: + # allure.attach(name=body=str("Couldn't get into additional details")) + print("Couldn't get into additional details") + except: + # allure.attach(name=body=str("No Connected SSIDS")) + print("No Connected SSIDS") + else: + try: + print("Into additional details") + time.sleep(2) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/wifi_details']") + additional_details_element.click() + except: + print("Couldn't get into additional details") + logging.info("Couldn't get into additional details") + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@text='Forget']") + forget_ssid.click() + print("Forgetting ssid") + except: + print("Couldn't Forget Ssid or No connected Ssid") + logging.warning("Couldn't Forget Ssid or No connected Ssid") + # ----------------------This is to Forget current connected SSID-------------------------------- + + try: + print("clicking on wifi switch") + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + get_switch_element.click() + except: + print("couldn't click on wifi switch") + + + except NoSuchElementException: + print("No Switch element found") + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except NoSuchElementException: + print("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + # -----------------To Open Connections page--------------------------- + else: # -----------------------Pixel4 code------------------------- + report.step_start("Set Wifi Network to " + ssid) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + report.step_start("Click Network & internet") + conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") + conn_element.click() + + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='android:id/icon']") + get_switch_text = get_switch_text_element.click() + if get_switch_text is not None: + switch_text = "Off" + else: + switch_text = "On" + + print("get_switch_text: ", switch_text) + print("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if switch_text == "Off": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if switch_text == "On": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@text='Add network']") + get_switch_text = get_switch_text_element.text + if get_switch_text == "Add network": + switch_text = "On" + else: + switch_text = "Off" + except NoSuchElementException: + print("Exception: Verify Xpath") + # Scroll Down + self.scrollDown(setup_perfectoMobile) + print("Sleeping for: ", i) + time.sleep(i) + pass + if switch_text == "Off": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + else: + print("Switch is already On") + self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + # ---------------------This is to Forget current connected SSID------------------------------- + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath("//*[@text='Connected']") + try: # To forget existing ssid + print("Entering into additional details") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/settings_button_no_background']") + additional_details_element.click() + except: + print("Couldn't get into additional details") + try: + print("To forget ssid") + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/button1']") + forget_ssid.click() + print("Forget old ssid") + except: + print("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + except: + print("No Connected SSIDS") + # ----------------------This is to Forget current connected SSID-------------------------------- + + try: + print("clicking on wifi switch") + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + get_switch_element.click() + except: + print("couldn't click on wifi switch") + + + except NoSuchElementException: + print("No Switch element found") + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except NoSuchElementException: + print("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + #---------------- WIFI connect for Enterprise security------------------ + def wifi_connect_eap(self, ssid, user, ttls_passwd, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/AccessPoint Connection") + print("-------------------------------------") + print("Verifying Wifi Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + # ip_address_element_text = False + ssid_with_internet = False + wifi_name = ssid + ssid_found = False + report.step_start("Switching Driver Context") + print("Switching Context to Native") + contexts = driver.contexts + driver.switch_to.context(contexts[0]) + + # Open Settings Application + self.openApp(connData["appPackage-android"], setup_perfectoMobile) + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + + if device_model_name != "Pixel 4": + logging.info("Selected Model is not Pixel 4") + report.step_start("Set Wifi Network to " + wifi_name) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + logging.info("Verifying Connected Wifi Connection") + report.step_start("Click Connections") + conn_element = driver.find_element_by_xpath("//*[@text='Connections']") + conn_element.click() + + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + logging.info("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi-Fi']"))) + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + print("get_switch_text: ", get_switch_text) + print("Find wifi switch") + logging.info("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if get_switch_text == "Off": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if get_switch_text == "On": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_text']") + get_switch_text = get_switch_text_element.text + except: + pass + print("Sleeping for: ", i) + time.sleep(i) + pass + if get_switch_text == "Off": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + else: + print("Switch is already On") + logging.info("Switch is already On") + # self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + logging.error("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + print("No Switch element found") + logging.error("No Switch element found") + # ---------------------This is to Forget current connected SSID------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + print("Trying to forget already connected ssid in Device OS-version=!12") + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_network_category']") + try: # To forget existing ssid + print("To forget ssid") + logging.info("To forget ssid") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//" + "*[@resource-id='com.android.settings:id/icon']") + forget_ssid.click() + print("Forget old ssid") + logging.info("Forget old ssid") + except: + print("Couldn't forget ssid") + logging.error("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + print("Couldn't get into additional details") + logging.error("Couldn't get into additional details") + except: + print("No Connected SSIDS") + logging.warning("No Connected SSIDS") + else: + print("Trying to forget already connected ssid in Device OS-version=12") + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/connected_list']/android.widget." + "LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]" + "/android.widget.RelativeLayout[2]") + try: # To forget existing ssid + print("To forget ssid in OS-Version 12") + logging.info("To forget ssid in OS-Version 12") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/wifi_details']") + additional_details_element.click() + try: + print("To forget ssid in OS-Version 12") + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/forget_button']//" + "*[@resource-id='com.android.settings:id/navigation_bar_item_icon_view']") + forget_ssid.click() + print("Forgot old ssid") + logging.info("Forgot old ssid") + except: + print("Couldn't forget ssid") + logging.error("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + print("Couldn't get into additional details") + logging.error("Couldn't get into additional details") + except: + print("No Connected SSIDS") + logging.warning("No Connected SSIDS") + # ----------------------This is to Forget current connected SSID-------------------------------- + + # time.sleep(2) + print("Selecting Wifi: " + wifi_name) + logging.info("Selecting SSID") + # allure.attach(name= body=str("Selecting Wifi: " + wifi_name)) + available_ssids = False + # This is To get all available ssids + # ------------------------------------------------------ + try: + for k in range(10): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if ssid not in available_ssids: + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(ssid + " : Found in Device") + logging.info(ssid + " : Found in Device") + # allure.attach(name= body=str(ssid+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + logging.warning("couldn't find wifi in available ssid") + if not ssid_found: + print("could not found " + ssid + " in device") + logging.info("could not found " + ssid + " in device") + # allure.attach(name= body=str("could not found" + ssid + " in device")) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + + # Selecting WIFI + # ------------------------------------------------------- + try: + report.step_start("Selecting Wifi: " + wifi_name) + print("Clicking WIFI") + logging.info("Clicking SSID") + wifi_selection_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifi_selection_element.click() + self.check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + logging.error("Exception on Selecting Wifi Network. Please check wifi Name or signal") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + + # Set username + # ------------------------------------------------------- + try: + # driver.implicitly_wait(3) + report.step_start("Set User name") + print("Set User name") + logging.info("Set User name") + wifi_user_element = WebDriverWait(driver, 40).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/edittext' and @password='false']"))) + wifi_user_element.send_keys(user) + except NoSuchElementException: + print("User name not Loaded") + logging.error("User name not Loaded") + # ------------------------------------------------------- + + # Set Password + # ------------------------------------------------------- + try: + # driver.implicitly_wait(6) + report.step_start("Set Password") + print("Set Password") + logging.info("Set Password") + wifi_password_element = WebDriverWait(driver, 40).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Enter password']"))) + wifi_password_element.send_keys(ttls_passwd) + print("Entered Password") + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + logging.error("Password Page Not Loaded, password May be cached in the System") + # ------------------------------------------------------- + # Selecting certificate + # ------------------------------------------------------- + try: + # driver.implicitly_wait(3) + report.step_start("Selecting CA Cert") + print("Selecting CA Cert") + logging.info("Selecting CA Cert") + cert_element = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Select certificate']"))) + cert_element.click() + except NoSuchElementException: + print("Selecting certificate failed") + logging.error("Selecting certificate failed") + # ------------------------------------------------------- + # Validating certificate + # ------------------------------------------------------- + try: + # driver.implicitly_wait(3) + report.step_start("Validting CA Cert") + print("Validting CA Cert") + logging.info("Validting CA Cert") + cert_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text=\"Don't validate\"]"))) + cert_element.click() + except NoSuchElementException: + print("validation failed") + logging.error("validation failed") + # ------------------------------------------------------- + if (device_model_name == "Galaxy S9"): + driver.hide_keyboard() + print("Hide keyboard") + # Click on connect button + # ------------------------------------------------------- + try: + # driver.implicitly_wait(3) + report.step_start("Click Connect Button") + print("Click Connect Button") + logging.info("Click Connect Button") + joinBTNElement = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Connect']"))) + joinBTNElement.click() + except NoSuchElementException: + print("Connect Button Not Enabled...Verify if Password is set properly ") + logging.error("Connect Button Not Enabled...Verify if Password is set properly ") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Verify if WiFi is connected + # ------------------------------------------------------- + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + try: + report.step_start("Verify if Wifi is Connected") + logging.info("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + logging.info("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + self.check_if_no_internet_popup(driver) + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id" + "/summary' and @text='Connected without internet']" + "/parent::*/android.widget.TextView[@text='" + + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + logging.info("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected - 2") + WifiInternetErrMsg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and " + "@text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + logging.info("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + logging.error("Wifi Connection Error") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + else: + try: + report.step_start( + "Verifying wifi connection status connected/connected without internet") + self.check_if_no_internet_popup(driver) + self.check_if_no_internet_popup(driver) + + wifi_connection_name = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings" + ":id/connected_list']/android.widget.LinearLayout[1]" + "/android.widget.LinearLayout[1]/android.widget." + "LinearLayout[1]/android.widget.RelativeLayout[2]/" + "android.widget.TextView[1]" + ))) + if wifi_connection_name.text == wifi_name: + wifi_connection_status = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary']" + ))) + if wifi_connection_status.text == "Connected": + ssid_with_internet = True + print("Connected with internet") + logging.info("Connected with internet") + + else: + ssid_with_internet = False + print("Wifi Successfully Connected without internet") + logging.info("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + # Go into additional details here + else: + # Connected to some other wifi, makes sense to close app and fail this testcase + logging.error("Connected to some other wifi") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except: + print("Couldn't find wifi Button") + logging.error("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + logging.error("Exception: Verify Xpath - Update/check Xpath for Click Connections") + # -----------------To Open Connections page--------------------------- + # --------------------Pixel 4 code--------------------------- + else: + report.step_start("Set Wifi Network to " + wifi_name) + + # -----------------To Open Connections page----------------------- + try: + print("Verifying Connected Wifi Connection") + report.step_start("Click Network & internet in pixel4") + conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") + conn_element.click() + # ---------------------Open WIFI page------------------------------- + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) + wifi_element.click() + + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + driver.implicitly_wait(1) + get_switch_text_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + get_switch_text = get_switch_text_element.text + # if get_switch_text is not None: + # switch_text = "OFF" + # else: + # switch_text = "ON" + switch_text = get_switch_text + print("get_switch_text: ", switch_text) + print("Find wifi switch") + try: # To Turn on Wi-Fi Switch + if switch_text == "OFF": + # driver.implicitly_wait(3) + get_switch_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(1) + get_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + if switch_text == "ON": + print("WIFI Switch is ON") + break + else: + try: + get_switch_text_element = driver.find_element_by_xpath( + "//*[@text='Add network']") + get_switch_text = get_switch_text_element.text + if get_switch_text == "Add network": + switch_text = "ON" + else: + switch_text = "OFF" + except NoSuchElementException: + print("Exception: Verify Xpath") + # Scroll Down + self.scrollDown(setup_perfectoMobile) + print("Sleeping for: ", i) + time.sleep(i) + pass + if switch_text == "OFF": + print("Switch is Still OFF") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + else: + print("Switch is already On") + self.check_if_no_internet_popup(driver) + except: + print("Couldn't turn on WIFI switch") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + + # ---------------------This is to Forget current connected SSID------------------------------- + try: # To deal with already connected SSID + self.check_if_no_internet_popup(driver) + network_category = driver.find_element_by_xpath("//*[@text='Connected']") + try: # To forget existing ssid + print("To forget ssid") + self.check_if_no_internet_popup(driver) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/settings_button_no_background']") + additional_details_element.click() + except: + print("Couldn't get into additional details") + try: + self.check_if_no_internet_popup(driver) + forget_ssid = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/button1']") + forget_ssid.click() + print("Forget old ssid") + except: + print("Couldn't forget ssid") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + print("No Connected SSIDS") + # ----------------------This is to Forget current connected SSID-------------------------------- + + time.sleep(2) + print("Selecting Wifi: " + wifi_name) + # allure.attach(name= body=str("Selecting Wifi: " + wifi_name)) + ssid_found = False + available_ssids = False + # This is To get all available ssids + # ------------------------------------------------------ + try: + for k in range(5): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if wifi_name not in available_ssids: + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + ssid_found = True + print(wifi_name + " : Found in Device") + # allure.attach(name= body=str(wifi_name+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + if not ssid_found: + ssid_not_found = False + for k in range(5): + available_ssids = self.get_all_available_ssids(driver, device_model_name) + print("active_ssid_list: ", available_ssids) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if wifi_name not in available_ssids: + self.scroll_up(driver) + time.sleep(2) + else: + ssid_not_found = True + print(wifi_name + " : Found in Device") + # allure.attach(name= body=str(wifi_name+" : Found in Device")) + break + except: + print("couldn't find wifi in available ssid") + if not ssid_not_found: + print("could not found " + wifi_name + " in device") + # allure.attach(name= body=str("could not found" + wifi_name + " in device")) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + + # Selecting WIFI + # ------------------------------------------------------- + try: + report.step_start("Selecting Wifi: " + wifi_name) + wifi_selection_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifi_selection_element.click() + self.check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + # Selecting certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Selecting CA Cert") + print("Selecting certificate") + logging.info("Selecting certificate") + cert_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/ca_cert']") + cert_element.click() + except NoSuchElementException: + print("Selecting certificate failed") + logging.error("Selecting certificate failed") + # ------------------------------------------------------- + # Validating certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Validting CA Cert") + print("validation") + logging.info("validation") + cert_element = driver.find_element_by_xpath( + "//*[@text='Do not validate']") + cert_element.click() + except NoSuchElementException: + print("validation failed") + logging.error("validation failed") + # Set username + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Set User name") + print("Set User name") + logging.info("Set User name") + wifi_user_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/identity']") + wifi_user_element.send_keys(user) + except NoSuchElementException: + print("User name not Loaded") + logging.error("User name not Loaded") + # ------------------------------------------------------- + # Scroll Down + self.scroll_down_pixel(setup_perfectoMobile) + time.sleep(2) + # Set Password + # ------------------------------------------------------- + try: + self.check_if_no_internet_popup(driver) + report.step_start("Set Wifi Password") + print("Entering password") + logging.info("Entering password") + wifi_password_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/password']") + wifi_password_element.send_keys(ttls_passwd) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + logging.error("Password Page Not Loaded, password May be cached in the System") + self.check_if_no_internet_popup(driver) + + # ------------------------------------------------------- + + # Click on connect button + # ------------------------------------------------------- + try: + driver.implicitly_wait(3) + report.step_start("Click Connect Button") + print("Click Connect Button") + logging.info("Click Connect Button") + join_element = driver.find_element_by_xpath("//*[@text='Connect']") + join_element.click() + except NoSuchElementException: + print("Connect Button Not Enabled...Verify if Password is set properly ") + logging.error("Connect Button Not Enabled...Verify if Password is set properly ") + self.check_if_no_internet_popup(driver) + # ------------------------------------------------------- + + # Verify if WiFi is connected + # ------------------------------------------------------- + try: + report.step_start("Verify if Wifi is Connected") + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + print("Not able to verify the connected WiFi. Scrolling up.") + self.scroll_up(driver) + self.scroll_up(driver) + # self.check_if_no_internet_popup(driver) + WifiInternetErrMsg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected") + print("Verifying after scrolling") + self.scroll_up(driver) + WifiInternetErrMsg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + + return ssid_with_internet, setup_perfectoMobile, ssid_found + # ------------------------------------------------------- + except: + print("No Switch element found") + # ---------------------To Turn on WIFi Switch if already OFF------------------------------- + + except: + print("Couldn't find wifi Button") + # ------------------Open WIFI page---------------------------------- + + except: + print("Exception: Verify Xpath - Update/check Xpath for Click Connections") + # -----------------To Open Connections page--------------------------- + + # self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet, setup_perfectoMobile, ssid_found + def run_speed_test(self, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Verify Upload & Download Speed") + print("-------------------------------------") + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + connData = connData + + currentResult = False + + driver.switch_to.context('WEBVIEW_1') + + try: + print("Launching Chrome") + report.step_start("Google Home Page") + logging.info("Launching Chrome") + driver.get(connData["webURL"]) + print("Enter Search Text") + logging.info("Entering Internet speed test search") + elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"]) + elementFindTxt.send_keys("Internet Speed Test") + try: + print("Click Search Button") + report.step_start("Click Search Button") + time.sleep(2) + driver.implicitly_wait(2) + elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") + elelSearch.click() + print("Keyboard enter") + driver.press_keycode(66) + except: + try: + time.sleep(2) + driver.implicitly_wait(2) + elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") + elelSearch.click() + except: + print("Search Drop Down not active...") + return False + + try: + print("Click Run Speed Test Button...") + report.step_start("Click Run Speed Test Button") + driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click() + except NoSuchElementException: + print("Error in speed test element ", NoSuchElementException) + return False + + # Get upload/Download Speed + try: + print("Get Download Speed") + report.step_start("Get upload/Download Speed") + time.sleep(60) + downloadMbps = driver.find_element_by_xpath(connData["downloadMbps"]) + downloadSpeed = downloadMbps.text + print("Download: " + downloadSpeed + " Mbps") + + print("Get Upload Speed") + report.step_start("Get Upload Speed") + UploadMbps = driver.find_element_by_xpath(connData["UploadMbps"]) + uploadSpeed = UploadMbps.text + print("Upload: " + uploadSpeed + " Mbps") + allure.attach(name="Speed Test logs: ", + body=str("Upload: " + uploadSpeed + " Mbps" + " Download: " + downloadSpeed + " Mbps")) + print("Access Point Verification Completed Successfully") + currentResult = True + except NoSuchElementException: + print("Access Point Verification NOT Completed, checking Connection....") + except Exception as e: + print("Launching Chrome Failed") + logging.error("Launching Chrome Failed") + print(e) + # allure.attach(name="Speed Test logs: ", body=str("Launching Safari Failed")) + # allure.attach(name="Speed Test logs: ", body=str("Error log: " + e)) + return currentResult + + def connect_captive_portal(self, ssid, setup_perfectoMobile, connData): + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + wifi_name = ssid + ssid_with_internet = False + if device_model_name != "Pixel 4": + # ---------------------Clicking on ssid for captive portal login-------- + try: + time.sleep(2) + report.step_start("Selecting Wifi: " + wifi_name) + wifi_selection_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifi_selection_element.click() + except NoSuchElementException: + print("Not connected to Captive portal Ssid.. ") + try: + time.sleep(2) + report.step_start("Click Accept Terms Button") + print("Click Accept Terms Button") + join_btn_element = driver.find_element_by_xpath("//*[@text='Accept Terms of Service']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't press Accept terms button") + try: + time.sleep(2) + report.step_start("Click Continue Button") + print("Click Continue Button") + join_btn_element = driver.find_element_by_xpath("//*[@text='Continue']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't press Continue button") + try: + time.sleep(2) + report.step_start("Click Last Terms if needed") + print("Click Last Terms if needed") + join_btn_element = driver.find_element_by_xpath("//*[@text='Done']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't find the last terms page") + + # Verify if WiFi is connected + # ------------------------------------------------------- + if self.get_phone_information(setup_perfectoMobile=setup_perfectoMobile, + search_this="osVersion") != "12": + try: + report.step_start("Verify if Wifi is Connected") + wifi_internet_err_msg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/" + "parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + self.check_if_no_internet_popup(driver) + wifi_internet_err_msg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and " + "@text='Connected without internet']/parent::*/android." + "widget.TextView[@text='" + + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected - 2") + wifi_internet_err_msg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/" + "parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + else: + try: + report.step_start( + "Verifying wifi connection status connected/connected without internet") + self.check_if_no_internet_popup(driver) + self.check_if_no_internet_popup(driver) + + wifi_connection_name = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/connected_list']/" + "android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/" + "android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]" + "/android.widget.TextView[1]"))) + if wifi_connection_name.text == wifi_name: + wifi_connection_status = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary']" + ))) + if wifi_connection_status.text == "Connected": + ssid_with_internet = True + print("Connected with internet") + + else: + ssid_with_internet = False + print("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + # Go into additional details here + else: + # Connected to some other wifi, makes sense to close app and fail this testcase + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + except: + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + else: + try: + report.step_start("Selecting Wifi: " + wifi_name) + wifiSelectionElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + wifi_name + "']"))) + wifiSelectionElement.click() + self.check_if_no_internet_popup(driver) + except Exception as e: + print("Exception on Selecting Wifi Network. Please check wifi Name or signal") + try: + time.sleep(20) + report.step_start("Click Accept Terms Button") + print("Click Accept Terms Button") + join_btn_element = driver.find_element_by_xpath("//*[@text='Accept Terms of Service']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't press Accept terms button") + try: + time.sleep(2) + report.step_start("Click Continue Button") + print("Click Continue Button") + join_btn_element = driver.find_element_by_xpath("//*[@text='Continue']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't press Continue button") + try: + time.sleep(2) + report.step_start("Click Last Terms if needed") + print("Click Last Terms if needed") + join_btn_element = driver.find_element_by_xpath("//*[@text='Done']") + join_btn_element.click() + except NoSuchElementException: + print(" Couldn't find the last terms page") + + # Verify if WiFi is connected + # ------------------------------------------------------- + try: + report.step_start("Verify if Wifi is Connected") + wifi_internet_err_msg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/" + "parent::*/android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + # time.sleep(5) + self.check_if_no_internet_popup(driver) + except: + try: + print("Not able to verify the connected WiFi. Scrolling up.") + self.scroll_up(setup_perfectoMobile) + self.scroll_up(setup_perfectoMobile) + # self.check_if_no_internet_popup(driver) + wifi_internet_err_msg = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@resource-id='com.android.settings:id/summary' and " + "@text='Connected without internet']/parent::*/android.widget." + "TextView[@text='" + wifi_name + "']"))) + print("Wifi Successfully Connected without internet") + self.check_if_no_internet_popup(driver) + except: + try: + report.step_start("Verify if Wifi is Connected") + print("Verifying after scrolling") + self.scroll_up(setup_perfectoMobile) + wifi_internet_err_msg = WebDriverWait(driver, 60).until( + EC.presence_of_element_located(( + MobileBy.XPATH, + "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/" + "android.widget.TextView[@text='" + wifi_name + "']"))) + ssid_with_internet = True + print("Wifi Successfully Connected") + except NoSuchElementException: + print("Wifi Connection Error: " + wifi_name) + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + return ssid_with_internet + + def toggle_wifi_mode(self, ssid, setup_perfectoMobile, connData): + print("\n-----------------------") + print("Toggle Wifi Mode") + print("-----------------------") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + device_model_name = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + device_model_name) + + if device_model_name != "Pixel 4": + report.step_start("Set Wifi Network to " + ssid) + + try: # Disabling wifi-toggle button + time.sleep(10) + print("Disable Wifi Radio Button") + report.step_start("Disable Wifi Radio Button") + wifiRadioBTN_On = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + wifiRadioBTN_On.click() + time.sleep(5) + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") + + try: # Enabling wifi-toggle button + print("Enable Wifi Radio Button") + report.step_start("Enable Wifi Radio Button") + wifiRadioBTN_Off = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + wifiRadioBTN_Off.click() + time.sleep(2) + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") + + try: # Checking whether connected to same ssid, after toggling wifi-button + if device_model_name == "Galaxy S9": + print("Get Connected Wifi Name if any after Wifi Radio is Enabled") + report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") + WifiNameElement1 = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.LinearLayout[2]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]"))) + Wifi_SSID_Name = WifiNameElement1.text + print("Current Wifi Status Name: " + Wifi_SSID_Name) + else: + print("Get Connected Wifi Name if any after Wifi Radio is Enabled") + report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") + WifiNameElement1 = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.LinearLayout[3]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.ViewGroup[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/androidx.recyclerview.widget.RecyclerView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]"))) + Wifi_SSID_Name = WifiNameElement1.text + print("Current Wifi Status Name: " + Wifi_SSID_Name) + + except NoSuchElementException: + Wifi_SSID_Name = "Null" + print("Device did not connect back to Wifi: " + ssid) + + if Wifi_SSID_Name.__eq__(ssid): + WifiFlag = True + else: + WifiFlag = False + + return WifiFlag + + else:#------------------For Pixel4 ------------------------ + try: # Disabling wifi-toggle button + time.sleep(2) + print("--Disable Wifi Radio Button") + report.step_start("Disable Wifi Radio Button") + wifiRadioBTN_On = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + wifiRadioBTN_On.click() + time.sleep(5) + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") + + try: # Enabling wifi-toggle button + print("--Enable Wifi Radio Button") + report.step_start("Enable Wifi Radio Button") + wifiRadioBTN_Off = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget']") + driver.implicitly_wait(2) + wifiRadioBTN_Off.click() + time.sleep(10) + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") + + try: # Checking whether connected to same ssid, after toggling wifi-button + print("Get Connected Wifi Name if any after Wifi Radio is Enabled") + report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") + WifiNameElement2 = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/androidx.recyclerview.widget.RecyclerView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.TextView[1]"))) + Wifi_SSID_Name = WifiNameElement2.text + print("Current Wifi Status Name: " + Wifi_SSID_Name) + except NoSuchElementException: + Wifi_SSID_Name = "Null" + print("Device did not connect back to Wifi: " + ssid) + + if Wifi_SSID_Name.__eq__(ssid): + WifiFlag = True + else: + WifiFlag = False + + return WifiFlag + + def toggle_airplane_mode(self, ssid, setup_perfectoMobile, connData): + print("\n-----------------------") + print("Toggle Airplane Mode") + print("-----------------------") + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + contexts = driver.contexts + # print(contexts) + + deviceModelName = self.getDeviceModelName(setup_perfectoMobile) + print("Selected Device Model: " + deviceModelName) + + airplaneFlag = False + + if deviceModelName != "Pixel 4": + try: + print("Clicking Connections") + report.step_start("Clicking Connections") + conn_element = driver.find_element_by_xpath('//*[@content-desc="Navigate up"]') + conn_element.click() + except: + print("Exception: Verify Xpath - Update/check Xpath for Connections") + if self.get_phone_information(setup_perfectoMobile, + search_this="osVersion") != "12": + try: + report.step_start("Toggle Airplane Mode to On") + print("Toggle Airplane Mode to On") + ToggleAirplanEle = driver.find_element_by_xpath( + "//*[@content-desc='Airplane mode' and @text='Off']") + ToggleAirplanEle.click() + airplaneFlag = True + + report.step_start("Toggle Airplane Mode to Off") + print("Toggle Airplane Mode to Off") + ToggleAirplanEle2 = driver.find_element_by_xpath( + "//*[@content-desc='Airplane mode' and @text='On']") + ToggleAirplanEle2.click() + except NoSuchElementException: + print("Toggle Airplane Exception, Airplane mode may be on Already.") + + try: + print("Checking to see if Airplane is already enabled") + report.step_start("Checking to see if Airplane is already enabled") + connElement = driver.find_element_by_xpath("//*[@content-desc='Airplane mode' and @text='On']") + airplaneFlag = True + report.step_start("Disable Airplane Mode") + connElement.click() + + except NoSuchElementException: + print("Airplane Mode is On & Off status elements Error, please check xpath or if the Page Loaded") + try: + print("Clicking Wi-Fi") + report.step_start("Clicking Wi-Fi") + time.sleep(3) + connElement = driver.find_element_by_xpath('//*[@text="Wi-Fi"]') + connElement.click() + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wi-Fi") + logging.info("Selected Model is not Pixel 4") + # Get into Additional Details + # To Get an IP Address + # ------------------------------------------------------- + try: + print("Into additional details") + logging.info("Into additional details") + time.sleep(2) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/layout_details']") + additional_details_element.click() + # --------------------Added for ssid Name check-------------------------- + try: + time.sleep(2) + ssid_name_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/entity_header_title']") + ssid_name_element_text = ssid_name_element.text + print("Ssid Name is :", ssid_name_element_text) + allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) + except: + print("Ssid name not available") + logging.error("Ssid name not available") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + assert False + except: + print("Couldn't get into Additional settings") + logging.error("Couldn't get into Additional settings") + # ------------------------------------------------------- + else: + try: + print("Clicking Airplane mode") + report.step_start("Clicking Airplane Mode") + conn_element = driver.find_element_by_xpath('//*[@text="Airplane mode"]') + conn_element.click() + except: + print("Exception: Verify Xpath - Update/check Xpath for Airplane Mode") + try: + report.step_start("Toggle Airplane Mode to On") + print("Toggle Airplane Mode to On") + ToggleAirplanEle = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget' and @text='Off']") + ToggleAirplanEle.click() + airplaneFlag = True + + report.step_start("Toggle Airplane Mode to Off") + print("Toggle Airplane Mode to Off") + ToggleAirplanEle2 = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget' and @text='On']") + ToggleAirplanEle2.click() + except NoSuchElementException: + print("Toggle Airplane Exception, Airplane mode may be on Already.") + + try: + print("Checking to see if Airplane is already enabled") + report.step_start("Checking to see if Airplane is already enabled") + connElement = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/switch_widget' and @text='On']") + airplaneFlag = True + report.step_start("Disable Airplane Mode") + connElement.click() + + except NoSuchElementException: + print("Airplane Mode is On & Off status elements Error, please check xpath or if the Page Loaded") + try: + print("Clicking Connections") + report.step_start("Clicking Connections") + conn_element = driver.find_element_by_xpath('//*[@content-desc="Navigate up"]') + conn_element.click() + except: + print("Exception: Verify Xpath - Update/check Xpath for Connections") + try: + print("Clicking Wi-Fi") + report.step_start("Clicking Wi-Fi") + time.sleep(3) + connElement = driver.find_element_by_xpath('//*[@text="Wi-Fi"]') + connElement.click() + except NoSuchElementException: + print("Exception: Verify Xpath - Update/check Xpath for Wi-Fi") + logging.info("Selected Model is not Pixel 4") + # Get into Additional Details + # To Get an IP Address + # ------------------------------------------------------- + try: + report.step_start("additional_details") + print("Into additional details") + logging.info("Into additional details") + time.sleep(2) + additional_details_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/wifi_details']") + additional_details_element.click() + + try: + print("click on view more") + logging.info("click on view more") + additional_details_element = WebDriverWait(driver, 50).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) + additional_details_element.click() + except: + pass + + try: + time.sleep(2) + ssid_name_element = driver.find_element_by_xpath( + "//*[@resource-id='com.android.settings:id/entity_header_title']") + ssid_name_element_text = ssid_name_element.text + print("Ssid Name is :", ssid_name_element_text) + allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) + except: + print("Ssid name not available") + logging.error("Ssid name not available") + pass + except: + print("Couldn't get into Additional settings") + logging.error("Couldn't get into Additional settings") + + if ssid.__eq__(ssid_name_element_text): + return True + else: + return False + + # ----------------Pixel 4 code------------ + else: + try: + print("Clicking Network & Internet") + report.step_start("Clicking Network & Internet") + conn_element = driver.find_element_by_xpath('//*[@content-desc="Navigate up"]') + conn_element.click() + except: + print("Exception: Verify Xpath - Update/check Xpath for Network & Internet") + try: + report.step_start("Toggle Airplane Mode to On") + print("Toggle Airplane Mode to On") + ToggleAirplanEle = driver.find_element_by_xpath( + '//*[@resource-id="android:id/switch_widget" and @text="OFF"]') + ToggleAirplanEle.click() + airplaneFlag = True + + report.step_start("Toggle Airplane Mode to Off") + print("Toggle Airplane Mode to Off") + ToggleAirplanEle2 = driver.find_element_by_xpath( + '//*[@resource-id="android:id/switch_widget" and @text="ON"]') + ToggleAirplanEle2.click() + except NoSuchElementException: + print("Toggle Airplane Exception, Airplane mode may be on Already.") + + try: + print("Checking to see if Airplane is already enabled") + report.step_start("Checking to see if Airplane is already enabled") + connElement = driver.find_element_by_xpath( + '//*[@resource-id="android:id/switch_widget" and @text="ON"]') + airplaneFlag = True + report.step_start("Disable Airplane Mode") + connElement.click() + + except NoSuchElementException: + print("Airplane Mode is On & Off status elements Error, please check xpath or if the Page Loaded") + try: + report.step_start("Clicking Wi-Fi") + print("Clicking WIFI") + time.sleep(3) + wifi_element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) + wifi_element.click() + except: + print("Couldn't find wifi Button") + try: + print("Into additional details") + time.sleep(5) + report.step_start("Into additional details") + additional_details_element = driver.find_element_by_xpath( + '//*[@resource-id="android:id/widget_frame"]') + additional_details_element.click() + print("Entered ssid") + try: + try: + time.sleep(2) + ssid_name_element = driver.find_element_by_xpath( + '//*[@resource-id="com.android.settings:id/entity_header_title"]') + ssid_name_element_text = ssid_name_element.text + print("Ssid Name is :", ssid_name_element_text) + allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) + except: + print("Ssid name not available") + logging.error("Ssid name not available") + self.closeApp(connData["appPackage-android"], setup_perfectoMobile) + assert False + except: + print("No advanced options") + except: + print("Couldn't get into Additional settings") + + if ssid.__eq__(ssid_name_element_text): + return True + else: + return False + +if __name__ == '__main__': + perfecto_data = { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL": "tip", + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + } + } + access_point = [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "upstream_port": "1.1.eth1", + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "candela6ghz", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "hello123", + "2g-encryption": "WPA2", + "5g-encryption": "open", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31 ", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae255", + "serial_port": True, + "host_ip": "10.28.3.102", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }] + obj = android_libs() diff --git a/libs/perfecto_interop/android_tests.py b/libs/perfecto_interop/android_tests.py new file mode 100644 index 000000000..273ad032b --- /dev/null +++ b/libs/perfecto_interop/android_tests.py @@ -0,0 +1,416 @@ +""" +This file contains functions that represents the Tests we can run on AP using Perfecto real clients +some tests are Client connectivity (For General and Enterprise Security) , Rate Limiting, Captive Portal, MultiPSK +Most of the Functions used are inherited from Android Libs which consists of Perfecto related Library Functions +Base functions used for all the tests are Wifi_connect and Wifi_disconnect +Wifi_connect is used to connect to a particular ssid that is passed as an argument on the real client +Wifi_disconnect is used to disconnect and forget that particular ssid that is passed as an argument on the real client +get_ip_address is used to get the ip address from the client of the connected ssid +speed_test is used to run the speed test on OOKLA speed test app +""" +from android_libs import android_libs + + +class AndroidTests(android_libs): + setup_perfectoMobile = [] + android_devices = { + "Galaxy S10.*": { + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10", + "jobNumber": 38 + }, + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + } + } + + def __init__(self, perfecto_data=None, dut_data=None, device=None, testcase=None): + # super().__init__(perfecto_data=perfecto_data, dut_data=dut_data) + self.perfecto_data = perfecto_data + self.dut_data = dut_data + self.device = device + self.testcase_name = testcase + self.connData = self.get_ToggleAirplaneMode_data(get_device_configuration=self.perfecto_data[device]) + print("connData------", self.connData) + + def client_connect(self, ssid, passkey): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + print(ssid_with_internet, ssid_found, "++++++++++") + if ssid_with_internet is not None and ssid_found is True: + ip_address = self.get_ip_address(ssid, setup, self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + print(ip_address, ssid_with_internet) + if ip_address is not None: + return "PASS", "Device got the IP address" + else: + self.teardown() + return "FAIL", "Device didn't get the IP address" + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_client_connect(self, ssid, identity, ttls_passwd): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + ip_address = self.get_ip_address(ssid, setup, self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + print(ip_address, ssid_with_internet) + if ip_address is not None: + return "PASS", "Device got the IP address" + else: + self.teardown() + return "FAIL", "Device didn't get the IP address" + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def client_connectivity_test(self, ssid, security=None, dut_data=None, passkey=None, mode=None, band=None, num_sta=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["appPackage-android"], setup) + down_speed, up_speed = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if down_speed is not None and up_speed is not None: + return "PASS", "Device connected to SSID and ran Internet speed test" + else: + self.teardown() + return "Fail", "Device didn't get connected to SSID" + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_client_connectivity_test(self, ssid, security=None, extra_securities=None, mode=None, band=None, + eap=None, ttls_passwd=None, identity=None, num_sta=None, dut_data=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, passkey=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["appPackage-android"], setup) + down_speed, up_speed = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if down_speed is not None and up_speed is not None: + return "PASS", "Device connected to SSID and ran Internet speed test" + else: + self.teardown() + return "Fail", "Device didn't get connected to SSID" + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def captive_portal(self, ssid, passkey): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + ip_address = self.connect_captive_portal(ssid, setup, self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + return ip_address, ssid_with_internet + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + except Exception as e: + print(e) + self.teardown() + + def rate_limiting_test(self, ssid_name, passkey, up_rate, down_rate, instance_name=None, mode=None,download_rate=None, + batch_size=None, upload_rate=None, protocol=None, duration=None, move_to_influx=None, + dut_data=None, num_stations=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid_name, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + try: + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["appPackage-android"], setup) + down_speed, up_speed = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid_name, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if down_speed is not None and up_speed is not None: + if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): + return "PASS", "Device connected to SSID and ran rate-limiting test" + else: + return "Fail", "Failed Rate-limiting test" + self.teardown() + else: + self.teardown() + return "Fail", "Device didn't get connected to SSID" + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def toggle_wifi_mode_test(self, ssid, passkey): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + wifi_toggling = self.toggle_wifi_mode(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if wifi_toggling is True: + return "PASS", "Connected to same ssid, after toggling the wifi button." + else: + return "FAIL", "Not connected to same ssid, after toggling the wifi button." + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_toggle_wifi_mode_test(self, ssid, identity, ttls_passwd): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, + ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + wifi_toggling = self.toggle_wifi_mode(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if wifi_toggling is True: + return "PASS", "Connected to same ssid, after toggling the wifi button." + else: + return "FAIL", "Not connected to same ssid, after toggling the wifi button." + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def toggle_airplane_mode_test(self, ssid, passkey): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + print(ssid_with_internet, ssid_found, "++++++++++") + if ssid_with_internet is True and ssid_found is True: + airplane_toggling = self.toggle_airplane_mode(ssid=ssid, setup_perfectoMobile=setup, connData=self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if airplane_toggling is True: + return "PASS", "Connected to same ssid, after toggling the airplane button." + else: + return "FAIL", "Not connected to same ssid, after toggling the airplane button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_toggle_airplane_mode_test(self, ssid, identity, ttls_passwd): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_android(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, + ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is True and ssid_found is True: + airplane_toggling = self.toggle_airplane_mode(ssid=ssid, setup_perfectoMobile=setup, connData=self.connData) + self.closeApp(self.connData["appPackage-android"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if airplane_toggling is True: + return "PASS", "Connected to same ssid, after toggling the airplane button." + else: + return "FAIL", "Not connected to same ssid, after toggling the airplane button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + +if __name__ == '__main__': + perfecto_data = { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL": "tip", + "Galaxy S10.*": { + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10.*", + "jobNumber": 38 + }, + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + } + } + access_point = [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "upstream_port": "1.1.eth1", + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "candela6ghz", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "hello123", + "2g-encryption": "WPA2", + "5g-encryption": "open", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31 ", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae255", + "serial_port": True, + "host_ip": "10.28.3.102", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }] + obj = AndroidTests(perfecto_data=perfecto_data, dut_data=access_point, device="Galaxy S10.*", + testcase="Test_perfecto_check") + print(obj.client_connectivity_test("ssid_wpa_5g_br_NE38276", security=None, + dut_data=None, passkey="something", mode=None, band=None, num_sta=None)) + + # print(obj.rate_limiting_test(ssid="ssid_wpa2_2g_RL_1VE7537",passkey="something",up_rate="60",down_rate="10")) + # print(obj.enterprise_client_connect(ssid="ssid_wpa_eap_5g_5O05610", identity="nolaradius", ttls_passwd="nolastart")) + # print(obj.client_connect(ssid="ssid_wpa_5g_br_NE38276", passkey="something")) + print(obj.enterprise_toggle_wifi_mode_test(ssid="ssid_wpa_eap_5g_5O05610", identity="nolaradius", + ttls_passwd="nolastart")) \ No newline at end of file diff --git a/libs/perfecto_libs/iOS_lib.py b/libs/perfecto_interop/ios_lib.py similarity index 96% rename from libs/perfecto_libs/iOS_lib.py rename to libs/perfecto_interop/ios_lib.py index d86900042..b918811b5 100644 --- a/libs/perfecto_libs/iOS_lib.py +++ b/libs/perfecto_interop/ios_lib.py @@ -4,22 +4,15 @@ 1. controller_data/sdk_base_url 2. login credentials """ -from ast import Str -from logging import exception -import unittest -import warnings -from _pytest.outcomes import fail -from perfecto.test import TestResultFactory -import pytest -import sys import time -from selenium.common.exceptions import NoSuchElementException, TimeoutException -from selenium.webdriver.common.by import By -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.support.ui import WebDriverWait -from appium.webdriver.common.mobileby import MobileBy -from selenium.webdriver.support import expected_conditions as EC + import allure +from appium.webdriver.common.mobileby import MobileBy +from perfecto.test import TestResultFactory +from selenium.common.exceptions import NoSuchElementException +from selenium.common.exceptions import TimeoutException +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait def openApp(appName, setup_perfectoMobile): @@ -44,7 +37,7 @@ def scrollDown(setup_perfectoMobile): def closeApp(appName, setup_perfectoMobile): - #print("Closing App.." + appName) + # print("Closing App.." + appName) setup_perfectoMobile[1].step_start("Closing App: " + appName) params = {'identifier': appName} setup_perfectoMobile[0].execute_script('mobile:application:close', params) @@ -89,14 +82,12 @@ def set_APconnMobileDevice_iOS(request, WifiNameSSID, WifiPass, setup_perfectoMo except NoSuchElementException: print("Exception: Verify Xpath - UpdateXpath") - if Wifi_AP_Name.__eq__(WifiNameSSID): print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - - #Verify if Ap is connected with Wifi + # Verify if Ap is connected with Wifi report.step_start("Verify Wifi Connection Status..") - #print("Click Wifi Connection..") + # print("Click Wifi Connection..") element.click() # Verifies if AP is connected to Wifi status @@ -109,7 +100,6 @@ def set_APconnMobileDevice_iOS(request, WifiNameSSID, WifiPass, setup_perfectoMo reportFlag = False assert reportFlag - print("Checking Internet Connection Error..") report.step_start("Checking Internet Connection Error..") @@ -191,13 +181,11 @@ def Toggle_AirplaneMode_iOS(request, setup_perfectoMobile, connData): currentResult = False print("Cellular Mode Not in Airplane Mode: ERROR") - AirplaneMode.click() except NoSuchElementException: currentResult = False print("Airplane Wifi Button not loaded...") - report.step_start("Verify No Sim Card Installed Msg Popup") print("Verify No Sim Card Installed Msg Popup..") try: @@ -205,7 +193,6 @@ def Toggle_AirplaneMode_iOS(request, setup_perfectoMobile, connData): except NoSuchElementException: print("No Sim Card AlertMsg") - print("Click ok on No Sim Card Msg Popup..") report.step_start("Click ok on No Sim Card Msg Popup") try: @@ -235,8 +222,9 @@ def verify_APconnMobileDevice_iOS(request, WifiName, setup_perfectoMobile, connD print("Get Connected Wifi Name") report.step_start("Get Connected Wifi Name") - element = WebDriverWait(driver, 45).until(EC.presence_of_element_located((MobileBy.XPATH, "//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]"))) - #element = driver.find_element_by_xpath("") + element = WebDriverWait(driver, 45).until(EC.presence_of_element_located( + (MobileBy.XPATH, "//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]"))) + # element = driver.find_element_by_xpath("") element.click() @@ -247,16 +235,15 @@ def verify_APconnMobileDevice_iOS(request, WifiName, setup_perfectoMobile, connD reportFlag = False assert reportFlag - - try: print("Waiting for Auto Connection to: " + WifiName) report.step_start("Waiting for Auto Connection to: " + WifiName) - selectedWifiNetwork = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ WifiName + "']/parent::*/XCUIElementTypeButton[@label='More Info']" - passPointWifi = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, selectedWifiNetwork))) + selectedWifiNetwork = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='" + WifiName + "']/parent::*/XCUIElementTypeButton[@label='More Info']" + passPointWifi = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, selectedWifiNetwork))) except Exception as e: - #Toggle Wifi Mode + # Toggle Wifi Mode Toggle_WifiMode_iOS(request, setup_perfectoMobile, connData) time.sleep(15) @@ -375,7 +362,6 @@ def Toggle_WifiMode_iOS(request, setup_perfectoMobile, connData): except NoSuchElementException: print("Wifi Radio Button Not Disabled...") - WifiDissconnected.click() print("Wifi Radio Button Toggled to Enabled") except NoSuchElementException: @@ -414,7 +400,7 @@ def get_WifiIPAddress_iOS(request, setup_perfectoMobile, connData, wifiName): try: - WifiInternetInfo=driver.find_element_by_xpath("(//XCUIElementTypeButton[@label='More Info'])[1]") + WifiInternetInfo = driver.find_element_by_xpath("(//XCUIElementTypeButton[@label='More Info'])[1]") WifiInternetInfo.click() except NoSuchElementException: @@ -422,7 +408,8 @@ def get_WifiIPAddress_iOS(request, setup_perfectoMobile, connData, wifiName): try: - WifiIPaddress= driver.find_element_by_xpath("(//*[@label='Router']/parent::*/XCUIElementTypeStaticText)[2]").text + WifiIPaddress = driver.find_element_by_xpath( + "(//*[@label='Router']/parent::*/XCUIElementTypeStaticText)[2]").text return WifiIPaddress except NoSuchElementException: @@ -471,8 +458,9 @@ def ping_deftapps_iOS(setup_perfectoMobile, AP_IPaddress): print("Verifying Packet Sent..") try: - packetSent = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Sent']/parent::*/XCUIElementTypeStaticText[2]").text - #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device") + packetSent = driver.find_element_by_xpath( + "//XCUIElementTypeStaticText[@label='Sent']/parent::*/XCUIElementTypeStaticText[2]").text + # assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device") except NoSuchElementException: print("-------Exception: Packet Sent Error, check object ID") @@ -481,8 +469,9 @@ def ping_deftapps_iOS(setup_perfectoMobile, AP_IPaddress): print("Verifying Packet Received..") try: - packetReceived = driver.find_element_by_xpath("//XCUIElementTypeStaticText[@label='Received']/parent::*/XCUIElementTypeStaticText[2]").text - #assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device") + packetReceived = driver.find_element_by_xpath( + "//XCUIElementTypeStaticText[@label='Received']/parent::*/XCUIElementTypeStaticText[2]").text + # assertEqual(element5.text, "0", "Packet Loss Exist, Please Check Device") except NoSuchElementException: print("-------Exception: Packet Sent Error, check object ID") @@ -494,7 +483,8 @@ def ping_deftapps_iOS(setup_perfectoMobile, AP_IPaddress): report.step_start("Verifying No route to host Error Msg..") try: - element7 = driver.find_element_by_xpath("(//XCUIElementTypeStaticText[@label='Sendto: No route to host'])[2]") + element7 = driver.find_element_by_xpath( + "(//XCUIElementTypeStaticText[@label='Sendto: No route to host'])[2]") print("Packet Loss Detected on AP!!!!!: " + AP_IPaddress) # self.assertNotEqual(element7.text, "Sendto: No route to host", "Packet Loss Exist, Please Check Device AP: " + Wifi_AP_Name) @@ -521,7 +511,7 @@ def tearDown(setup_perfectoMobile): except Exception as e: print(" -- Exception Not Able To close --") - print (e) + print(e) finally: try: @@ -529,7 +519,7 @@ def tearDown(setup_perfectoMobile): except Exception as e: print(" -- Exception Not Able To Quit --") - print (e) + print(e) def verifyUploadDownloadSpeediOS(request, setup_perfectoMobile, get_APToMobileDevice_data): @@ -637,7 +627,6 @@ def downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfect except TimeoutException: print("no alert") - openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) try: @@ -677,7 +666,8 @@ def downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfect print("Verify Profile Installed") report.step_start("Verify Profile Installed") - elelSearch2 = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Profile Installed']"))) + elelSearch2 = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Profile Installed']"))) elelSearch2.click() except Exception as e: @@ -711,21 +701,19 @@ def downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfect # openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) +# try: +# print("Verifying OpenRoaming Connected Wifi") +# time.sleep(3) +# report.step_start("Verifying Connected Wifi Name") +# element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]") +# OpenRoamingWifiName = element.text +# element.click() - - # try: - # print("Verifying OpenRoaming Connected Wifi") - # time.sleep(3) - # report.step_start("Verifying Connected Wifi Name") - # element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']/XCUIElementTypeStaticText[2]") - # OpenRoamingWifiName = element.text - # element.click() - - # except Exception as e: - # OpenRoamingWifiName = "None" - # print("Wifi Not Connected to OpenRoaming Profile: ") - # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - # assert False +# except Exception as e: +# OpenRoamingWifiName = "None" +# print("Wifi Not Connected to OpenRoaming Profile: ") +# request.config.cache.set(key="SelectingWifiFailed", value=str(e)) +# assert False # except Exception as e: # OpenRoamingWifiName = "None" @@ -786,9 +774,9 @@ def ForgetProfileWifiConnection(request, setup_perfectoMobile, installedProfileS if Wifi_AP_Name.__eq__("Not Connected"): print("Not Connected to any wifi") - #deleteOpenRoamingInstalledProfile(request, installedProfileSSID, setup_perfectoMobile, connData) + # deleteOpenRoamingInstalledProfile(request, installedProfileSSID, setup_perfectoMobile, connData) elif Wifi_AP_Name.__eq__("None"): - #deleteOpenRoamingInstalledProfile(request, installedProfileSSID, setup_perfectoMobile, connData) + # deleteOpenRoamingInstalledProfile(request, installedProfileSSID, setup_perfectoMobile, connData) print("Not Connected to any wifi Network/None") elif Wifi_AP_Name.__eq__(installedProfileSSID): @@ -985,23 +973,25 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa # ---------------------This is to Forget current connected SSID------------------------------- # ---------------------This to Avoid any popup page from captive portal--------------------# - try: time.sleep(4) print("getting in to Additional details") report.step_start("Clicking More Info") - additional_details_element = driver.find_element_by_xpath("//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") additional_details_element.click() try: time.sleep(2) print("Forget Connected Network") - forget_ssid = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) forget_ssid.click() print("Forget old ssid") try: time.sleep(2) report.step_start("Forget SSID popup1") - forget_ssid_popup = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) forget_ssid_popup.click() print("**alert** Forget SSID popup killed **alert**") @@ -1076,7 +1066,8 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa report.step_start("Selecting SSID To Connect") ssid_found = True print(WifiName + " : Found in Device") - wifiSelElement = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) + wifiSelElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) print(wifiSelElement) wifiSelElement.click() print("Selecting SSID") @@ -1089,7 +1080,7 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa except: print("couldn't connect to " + WifiName) - #request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) return ip_address_element_text, is_internet pass @@ -1156,7 +1147,7 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa print("Checking SSID Name") ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text print(ssidname_text) - if(ssidname_text == WifiName): + if (ssidname_text == WifiName): print("SSID Matched") allure.attach(name="SSID Matched ", body=str(WifiName)) else: @@ -1199,14 +1190,16 @@ def get_ip_address_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa try: report.step_start("Forget Network") - forget_ssid = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) forget_ssid.click() print("Forget old ssid") # time.sleep(2) # driver.implicitly_wait(3) try: report.step_start("Forget Network popup") - forget_ssid_popup = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) forget_ssid_popup.click() except: print("in popup exception") @@ -2028,8 +2021,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM driver.implicitly_wait(4) report.step_start("Clicking Trust CA Cert") print("Clicking Trust CA Cert") - certElement = WebDriverWait(driver, 45).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@label='Trust']"))) + certElement = driver.find_element_by_xpath("//*[@label='Trust']") certElement.click() except NoSuchElementException: print("Password Page Not Loaded, password May be cached in the System") @@ -2063,7 +2055,7 @@ def get_ip_address_eap_ios(request, WifiName, User, ttls_passwd, setup_perfectoM print("Checking SSID Name") ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text print(ssidname_text) - if(ssidname_text == WifiName): + if (ssidname_text == WifiName): print("SSID Matched") allure.attach(name="SSID Matched ", body=str(WifiName)) else: @@ -2387,7 +2379,8 @@ def wifi_connect_eap(request, WifiName, User, ttls_passwd, setup_perfectoMobile, # ---------------------close app------------------------------- -#Captive Portal + +# Captive Portal def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connData): print("\n-------------------------------------") print("CaptivePortal Connection iOS") @@ -2474,8 +2467,6 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa # ---------------------This to Avoid any popup page from captive portal--------------------# - - try: time.sleep(4) print("getting in to Additional details") @@ -2636,7 +2627,8 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa time.sleep(8) print("Accepting terms and Services") report.step_start("loading Terms Page") - element = WebDriverWait(driver,40).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Accept Terms of Service']"))) + element = WebDriverWait(driver, 40).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Accept Terms of Service']"))) element.click() except NoSuchElementException: print("Exception: Accept Terms of Service Button Not Found") @@ -2645,14 +2637,16 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa try: print("Continue to connect the services") report.step_start("Continiue Terms and Services Page") - element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Continue']"))) + element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Continue']"))) element.click() except NoSuchElementException: print("Exception: Continue to connect Terms of Service Button Not Found") try: print("Continue to the services") report.step_start("Continue to use captive portal services") - element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Continue']"))) + element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Continue']"))) element.click() except NoSuchElementException: print("Exception: Continue to use captive portal services not found") @@ -2660,7 +2654,8 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa time.sleep(2) print("Final Result Page") report.step_start("Final Confirmation Page for Captive Portal Login") - element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Done']"))) + element = WebDriverWait(driver, 10).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Done']"))) element.click() # if element == driver.find_element_by_xpath("//XCUIElementTypeOther[@label='Success']"): # element1 = driver.find_element_by_xpath("//*[@label='Done']") @@ -2674,8 +2669,7 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa except NoSuchElementException: print("No Splash Page Found") - -# ---------------------Additional INFO------------------------------- + # ---------------------Additional INFO------------------------------- try: driver.implicitly_wait(5) print("Selecting SSID: ", WifiName) @@ -2761,18 +2755,20 @@ def captive_portal_ios(request, WifiName, WifiPass, setup_perfectoMobile, connDa closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) return ip_address_element_text, is_internet + # Returns whether the ssid is currently visible -def ssid_Visible(driver,WifiName): +def ssid_Visible(driver, WifiName): wifiSelectionElement = WebDriverWait(driver, 30).until( EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) isVisible = wifiSelectionElement.get_attribute("visible") print(f"Is ssid visible: {isVisible}") - if(isVisible == 'false'): + if (isVisible == 'false'): return False else: return True -#--------------------------------Gets ip address from ssid but it won't get disconnected from it------------------ + +# --------------------------------Gets ip address from ssid but it won't get disconnected from it------------------ def gets_ip_add_and_does_not_forget_ssid_ios(request, WifiName, WifiPass, setup_perfectoMobile, connData): print("\n-------------------------------------") print("Select Wifi/Get IP Address IOS Connection") @@ -2861,16 +2857,19 @@ def gets_ip_add_and_does_not_forget_ssid_ios(request, WifiName, WifiPass, setup_ time.sleep(3) print("getting in to Additional details") report.step_start("Clicking More Info") - additional_details_element = driver.find_element_by_xpath("//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") additional_details_element.click() try: print("Forget Connected Network") - forget_ssid = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) forget_ssid.click() print("Forget old ssid") try: report.step_start("Forget SSID popup1") - forget_ssid_popup = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) forget_ssid_popup.click() print("**alert** Forget SSID popup killed **alert**") @@ -2985,7 +2984,7 @@ def gets_ip_add_and_does_not_forget_ssid_ios(request, WifiName, WifiPass, setup_ print("Checking SSID Name") ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text print(ssidname_text) - if(ssidname_text == WifiName): + if (ssidname_text == WifiName): print("SSID Matched") allure.attach(name="SSID Matched ", body=str(WifiName)) else: @@ -3033,7 +3032,9 @@ def gets_ip_add_and_does_not_forget_ssid_ios(request, WifiName, WifiPass, setup_ # --------------------- close app------------------------------- closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) return ip_address_element_text, is_internet -#----------------Gets ip address of Enterprise ssids and won't forget it--------------- + + +# ----------------Gets ip address of Enterprise ssids and won't forget it--------------- def gets_ip_add_eap_and_does_not_forget_ssid_ios(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): print("\n-------------------------------------") print("Get IP Address Enterprise IOS Connection") @@ -3222,7 +3223,8 @@ def gets_ip_add_eap_and_does_not_forget_ssid_ios(request, WifiName, User, ttls_p try: report.step_start("Clicking Join") print("Clicking Join") - joinBTN = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Join']"))) + joinBTN = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Join']"))) joinBTN.click() except Exception as e: print("Join Button Not Enabled...Password may not be needed") @@ -3232,7 +3234,8 @@ def gets_ip_add_eap_and_does_not_forget_ssid_ios(request, WifiName, User, ttls_p try: report.step_start("Clicking Trust CA Cert") print("Clicking Trust CA Cert") - certElement = WebDriverWait(driver, 30).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Trust']"))) + certElement = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Trust']"))) certElement.click() except NoSuchElementException: print("Password Page Not Loaded, password May be cached in the System") @@ -3265,7 +3268,7 @@ def gets_ip_add_eap_and_does_not_forget_ssid_ios(request, WifiName, User, ttls_p print("Checking SSID Name") ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text print(ssidname_text) - if(ssidname_text == WifiName): + if (ssidname_text == WifiName): print("SSID Matched") allure.attach(name="SSID Matched ", body=str(WifiName)) else: @@ -3316,9 +3319,7 @@ def gets_ip_add_eap_and_does_not_forget_ssid_ios(request, WifiName, User, ttls_p return ip_address_element_text, is_internet - - -#------------------Gets the ip address of already connected ssid--------------------------------------- +# ------------------Gets the ip address of already connected ssid--------------------------------------- def gets_ip_add_for_checking_and_forgets_ssid_ios(request, WifiName, WifiPass, setup_perfectoMobile, connData): print("\n-------------------------------------") print("Select Wifi/Get IP Address IOS Connection") @@ -3416,7 +3417,7 @@ def gets_ip_add_for_checking_and_forgets_ssid_ios(request, WifiName, WifiPass, s print("Checking SSID Name") ssidname_text = driver.find_element_by_xpath("//*[@label='" + WifiName + "']").text print(ssidname_text) - if(ssidname_text == WifiName): + if (ssidname_text == WifiName): print("SSID Matched") allure.attach(name="SSID Matched ", body=str(WifiName)) else: @@ -3463,6 +3464,8 @@ def gets_ip_add_for_checking_and_forgets_ssid_ios(request, WifiName, WifiPass, s # --------------------- close app------------------------------- closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) return ip_address_element_text, is_internet + + def getDeviceModelName(setup_perfectoMobile): report = setup_perfectoMobile[1] driver = setup_perfectoMobile[0] @@ -3473,6 +3476,7 @@ def getDeviceModelName(setup_perfectoMobile): print("ModelName: " + deviceModel) return deviceModel + def return_upload_download_speed_iOS(request, setup_perfectoMobile, get_APToMobileDevice_data): print("\n-------------------------------------") print("Verify Upload & Download Speed") @@ -3507,7 +3511,7 @@ def return_upload_download_speed_iOS(request, setup_perfectoMobile, get_APToMobi deviceModelName = getDeviceModelName(setup_perfectoMobile) print("Selected Device Model: " + deviceModelName) try: - if (deviceModelName!="iPhone-7"): + if (deviceModelName != "iPhone-7"): try: print("Launching Safari") report.step_start("Google Home Page") @@ -3568,7 +3572,6 @@ def return_upload_download_speed_iOS(request, setup_perfectoMobile, get_APToMobi currentResult = False print("Search Button Issue") - # try: # print("Click Search Button") # report.step_start("Click Search Button") @@ -3611,21 +3614,3 @@ def return_upload_download_speed_iOS(request, setup_perfectoMobile, get_APToMobi print("Access Point Verification NOT Completed, checking Connection....") return downloadSpeed, uploadSpeed - -def ookla_speed_test_iOS(request, setup_perfectoMobile, get_APToMobileDevice_data): - driver = setup_perfectoMobile[0] - driver.switch_to.context('NATIVE_APP') - openApp( 'com.ookla.speedtest', setup_perfectoMobile) - driver.find_element_by_xpath("//*[@label='GO']").click() - # Wait untill 2 minutes for the test to complete - WebDriverWait(driver, 120).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@value='Test Again']"))) - result = driver.find_element_by_xpath("//XCUIElementTypeOther[contains(@label,'Download Speed')]").text - print(result) - downloadSpeed = result.split('Download Speed, ')[1].split('. ')[0] - uploadSpeed = result.split('Upload speed, ')[1].split('. ')[0] - downloadSpeed = str(downloadSpeed)[0:4] - uploadSpeed = str(uploadSpeed)[0:4] - print(f"Download speed: {downloadSpeed}") - print(f"Upload speed: {uploadSpeed}") - return downloadSpeed, uploadSpeed \ No newline at end of file diff --git a/libs/perfecto_interop/ios_libs.py b/libs/perfecto_interop/ios_libs.py new file mode 100644 index 000000000..23e3398ad --- /dev/null +++ b/libs/perfecto_interop/ios_libs.py @@ -0,0 +1,1352 @@ +""" +This file contains the functions that are required for Perfecto iOS devices +""" +import logging +import os +import re +import time +import warnings +from time import gmtime, strftime +import allure +import pytest +import requests +import urllib3 +from appium import webdriver +from appium.webdriver import webdriver +from appium.webdriver.common.mobileby import MobileBy +from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient, TestContext) +from perfecto.model.model import Job, Project +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from xml.etree import ElementTree as ET + + +class ios_libs: + global driver, perfecto_execution_context, deviceModel + def __init__(self, perfecto_data=None, dut_data=None, testcase=None): + logging_level = logging.INFO + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging_level) + self.perfecto_data = perfecto_data + self.dut_data = dut_data + self.testcase_name = testcase + pass + + # Opens an APP on the device based on the argument given + def openApp(self, appName, setup_perfectoMobile): + setup_perfectoMobile[1].step_start("Opening App: " + appName) + params = {'identifier': appName} + # Open/Close/Open Action is performed to ensure the app is back to its Original Settings + setup_perfectoMobile[0].execute_script('mobile:application:open', params) + setup_perfectoMobile[0].execute_script('mobile:application:close', params) + setup_perfectoMobile[0].execute_script('mobile:application:open', params) + + # Tries to swipe the screen on the device based on the Params given + def scrollDown(self, setup_perfectoMobile): + print("Scroll Down") + setup_perfectoMobile[1].step_start("Scroll Down") + params2 = {} + params2["start"] = "50%,90%" + params2["end"] = "50%,20%" + params2["duration"] = "4" + # time.sleep(2) + setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) + time.sleep(3) + + # Closes an APP on the device based on the argument given + def closeApp(self, appName, setup_perfectoMobile): + # print("Closing App.." + appName) + setup_perfectoMobile[1].step_start("Closing App: " + appName) + params = {'identifier': appName} + setup_perfectoMobile[0].execute_script('mobile:application:close', params) + + # Returns the Data needed for the Device + def get_ToggleAirplaneMode_data(self, get_device_configuration): + + passPoint_data = { + "webURL": "https://www.google.com", + "lblSearch": "//*[@class='gLFyf']", + "elelSearch": "(//*[@class='sbic sb43'])[1]", + "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", + "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], + "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", + "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", + # Android + "platformName-android": get_device_configuration["platformName-android"], + "appPackage-android": get_device_configuration["appPackage-android"] + } + return passPoint_data + + def report_client(self, value): + global reporting_client # declare a to be a global + reporting_client = value # this sets the global value of a + + def reportPerfecto(testCaseName, testCaseStatus, testErrorMsg, reportURL): + global testCaseNameList # declare a to be a global + global testCaseStatusList + global testCaseErrorMsg + global testCaseReportURL + + testCaseNameList.append(testCaseName) + testCaseStatusList.append(testCaseStatus) + testCaseErrorMsg.append(str(testErrorMsg)) + testCaseReportURL.append(reportURL) + + # Gets the Device response from Perfecto + def response_device(self, model): + securityToken = self.perfecto_data["securityToken"] + perfectoURL = self.perfecto_data["perfectoURL"] + url = f"https://{perfectoURL}.perfectomobile.com/services/handsets?operation=list&securityToken={securityToken}&model={model}" + resp = requests.get(url=url) + return ET.fromstring(resp.content) + + def get_attribute_device(self, responseXml, attribute): + try: + return responseXml.find('handset').find(attribute).text + except: + print(f"Unable to get value of {attribute} from response") + return "" + + # Checks to see if a particular handset is available + def is_device_available(self, model): + try: + response_xml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + device_available = self.get_attribute_device(response_xml, 'available') + print("Result:" + device_available) + if device_available == 'true': + return True + else: + allocated_to = self.get_attribute_device(response_xml, 'allocatedTo') + print("The device is currently allocated to:" + allocated_to) + return False + + # Checks whether the device is available or not.If the device is not available rechecks depending upon the + # 'timerValue' and 'timerThreshold' values.With the current parameters it will check after:10,20,40,80 mins. + def is_device_Available_timeout(self, model): + device_available = self.is_device_available(model) + timer_value = 5 + timer_threshold = 80 + if not device_available: + while timer_value <= timer_threshold: + print("Last checked at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + print(f"Waiting for: {timer_value} min(s)") + time.sleep(timer_value * 60) + print("Checking now at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + device_available = self.is_device_available(model) + if device_available: + return True + else: + timer_value = timer_value + 5 + + if timer_value > timer_threshold: + return False + else: + return True + else: + return True + + def get_device_attribuites(self, model, attribute): + try: + response_xml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + try: + attribute_value = self.get_attribute_device(response_xml, str(attribute)) + except: + attribute_value = False + return attribute_value + + # Used to get the iOS Device driver obj for further utility,Base function for iOS Tests + def setup_perfectoMobile_iOS(self, get_device_configuration, perfecto_data): + global perfecto_execution_context, driver, deviceModel + from appium import webdriver + driver = None + reporting_client = None + warnings.simplefilter("ignore", ResourceWarning) + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + capabilities = { + 'platformName': get_device_configuration["platformName-iOS"], + 'model': get_device_configuration["model-iOS"], + 'browserName': 'safari', + # 'automationName' : 'Appium', + 'securityToken': perfecto_data["securityToken"], + 'useAppiumForWeb': 'false', + 'autoAcceptAlerts': 'true', + # 'bundleId' : request.config.getini("bundleId-iOS"), + 'useAppiumForHybrid': 'false', + } + + # Check if the device is available + if not self.is_device_Available_timeout(capabilities['model']): + print("Unable to get device.") + pytest.exit("Exiting Pytest") + + driver = webdriver.Remote( + 'https://' + perfecto_data["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', + capabilities) + driver.implicitly_wait(2) + if os.environ.get('PYTEST_CURRENT_TEST') is not None: + TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0] + nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName) + else: + nCurrentTestMethodNameSplit = self.testcase_name + try: + # TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_') + testcase = nCurrentTestMethodNameSplit.replace('test_', '') + print("\n\nExecuting TestCase: " + testcase) + except Exception as e: + TestCaseName = nCurrentTestMethodNameSplit + print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL") + # print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/") + + projectname = perfecto_data["projectName"] + projectversion = perfecto_data["projectVersion"] + jobname = get_device_configuration["jobName"] + jobnumber = get_device_configuration["jobNumber"] + tags = perfecto_data["reportTags"] + test_case_name = testcase + + print("\nSetting Perfecto ReportClient....") + perfecto_execution_context = PerfectoExecutionContext(driver, tags, Job(jobname, jobnumber), + Project(projectname, projectversion)) + reporting_client = PerfectoReportiumClient(perfecto_execution_context) + reporting_client.test_start(test_case_name, TestContext([], "Perforce")) + self.report_client(reporting_client) + try: + params = {'property': 'model'} + deviceModel = driver.execute_script('mobile:handset:info', params) + except: + pass + + # request.addfinalizer(teardown) + + if driver is None: + yield -1 + else: + yield driver, reporting_client + + # Teardown function used to release all the data that presently hold from Perfecto + def teardown(self): + global driver, perfecto_execution_context, deviceModel + reporting_client = PerfectoReportiumClient(perfecto_execution_context) + try: + print("\n---------- Tear Down ----------") + print('Report-Url: ' + reporting_client.report_url()) + try: + allure.dynamic.link( + str(reporting_client.report_url()), + name=str(deviceModel)) + except: + print("fail to attach video link") + print("----------------------------------------------------------\n\n\n\n") + driver.close() + except Exception as e: + print(" -- Exception While Tear Down --") + driver.close() + print(e) + finally: + try: + driver.quit() + except Exception as e: + print(" -- Exception Not Able To Quit --") + print(e) + + # Checks the Available SSIDS on device and return them in the form of List + def get_all_available_ssids(self, driver): + print("\n----------------------------") + print("Get All Available SSID") + print("------------------------------") + + active_ssid_list = [] + try: + time.sleep(2) + driver.implicitly_wait(2) + elements = driver.find_elements_by_xpath("(//*[@label='More Info']/parent::*/XCUIElementTypeStaticText)") + print(len(elements)) + for i in range(len(elements)): + active_ssid_list.append(elements[i].text) + print("active_ssid_list: ", active_ssid_list) + except: + print("No SSIDS available") + + return active_ssid_list + + # checks if SSID is visible or not on the Phone screen + def ssid_Visible(self, driver, WifiName): + wifiSelectionElement = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + WifiName + "']"))) + isVisible = wifiSelectionElement.get_attribute("visible") + print(f"Is ssid visible: {isVisible}") + if (isVisible == 'false'): + return False + else: + return True + + # Tries to swipe the screen on the device based on the Params given + def scrollDown(self, setup_perfectoMobile): + print("Scroll Down") + setup_perfectoMobile[1].step_start("Scroll Down") + params2 = {} + params2["start"] = "50%,90%" + params2["end"] = "50%,20%" + params2["duration"] = "4" + # time.sleep(2) + setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) + time.sleep(3) + + # Runs Speed test on OOKla Speed test App on Android devices, OOKLA app should be present on the Device + def speed_test(self, setup_perfectoMobile): + driver = setup_perfectoMobile[0] + driver.switch_to.context('NATIVE_APP') + self.openApp('com.ookla.speedtest', setup_perfectoMobile) + driver.find_element_by_xpath("//*[@label='GO']").click() + # Wait untill 2 minutes for the test to complete + WebDriverWait(driver, 120).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@value='Test Again']"))) + result = driver.find_element_by_xpath("//XCUIElementTypeOther[contains(@label,'Download Speed')]").text + print(result) + download_speed = result.split('Download Speed, ')[1].split('. ')[0] + upload_speed = result.split('Upload speed, ')[1].split('. ')[0] + download_speed = str(download_speed)[0:4] + upload_speed = str(upload_speed)[0:4] + print(f"Download speed: {download_speed}") + print(f"Upload speed: {upload_speed}") + return download_speed, upload_speed + + # Function used to connect to a particular SSID + def wifi_connect(self, ssid, passkey, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/Get IP Address IOS Connection") + print("-------------------------------------") + is_internet = False + wifi_name = ssid + wifi_pass = passkey + ssid_found = False + print("Verifying Wifi/AP Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + # driver.switch_to.context(contexts[0]) + + report.step_start("Set Wifi Network to " + wifi_name) + # Open Settings Application + logging.info("Opening IOS setting APP") + self.openApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + try: + time.sleep(2) + driver.implicitly_wait(2) + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + logging.error("Exception: Verify Xpath - unable to click on Wifi") + + time.sleep(2) + driver.implicitly_wait(4) + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + try: + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("Switch is OFF") + logging.info("Wifi Switch is OFF") + + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + print("WIFI Switch is ON") + logging.info("Wifi Switch is ON") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is ON") + logging.info("Wifi Switch is ON") + if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0): + print("switch is still OFF") + logging.error("Wifi Switch is OFF") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + else: + print("Switch is Still OFF") + logging.error("Wifi Switch is OFF") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + except: + print("No switch element found") + logging.error("No switch element found") + except: + print("get_wifi_switch_element is ON") + logging.warning("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except: + print("Cannot find WIFI element") + logging.error("Cannot find WIFI element") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + + # ---------------------This is to Forget current connected SSID------------------------------- + # ---------------------This to Avoid any popup page from captive portal--------------------# + + try: + time.sleep(4) + print("getting in to Additional details") + report.step_start("Clicking More Info") + logging.info("getting in to Additional details") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + time.sleep(2) + print("Forget Connected Network") + logging.info("Forget Connected Network") + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid.click() + print("Forget old ssid") + logging.info("Forget old ssid") + try: + time.sleep(2) + report.step_start("Forget SSID popup1") + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + logging.warning("couldn't find forget ssid element") + except: + print("No connected SSID") + logging.info("No connected SSID") + try: + report.step_start("Unexpected Captive Popup") + print("Unexpeceted Captive Poped Up") + captive_portal_cancel_element = driver.find_element_by_xpath("//*[@label='Cancel']") + captive_portal_cancel_element.click() + time.sleep(2) + use_other_network_element = driver.find_element_by_xpath("//*[@label='Use Other Network']") + use_other_network_element.click() + time.sleep(2) + except: + print("No Captive Portal Popup Found") + try: + time.sleep(4) + print("getting in to Additional details") + report.step_start("Clicking More Info") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + time.sleep(2) + print("Forget Connected Network") + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid.click() + print("Forget old ssid") + try: + time.sleep(2) + report.step_start("Forget SSID popup1") + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + except: + print("No connected SSID") + + # ---------------------This is to Forget current connected SSID------------------------------- + + # ---------------------To get all available SSID and select it------------------------------- + print("Searching for Wifi: " + wifi_name) + # allure.attach(name= body=str("Searching for Wifi: " + wifi_name)) + time.sleep(2) + report.step_start("Searching SSID") + print("Selecting Wifi: " + wifi_name) + available_ssids = False + + try: + for check_for_all_ssids in range(12): + available_ssids = self.get_all_available_ssids(driver) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if (not self.ssid_Visible(driver, wifi_name)) or (wifi_name not in available_ssids): + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + try: + driver.implicitly_wait(8) + report.step_start("Selecting SSID To Connect") + ssid_found = True + print(wifi_name + " : Found in Device") + wifiSelElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + wifi_name + "']"))) + print(wifiSelElement) + wifiSelElement.click() + print("Selecting SSID") + break + except: + print("SSID unable to select") + logging.error("Unable to select SSID") + report.step_start("Selecting Unable SSID To Connect") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + + except: + print("couldn't connect to " + wifi_name) + logging.error("Couldn't Find ssid") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + pass + + if not ssid_found: + print("could not found " + wifi_name + " in device") + logging.error("Couldn't Find ssid in device") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + except: + pass + # ---------------------To get all available SSID and select it------------------------------- + # ---------------------Set Password------------------------------- + try: + driver.implicitly_wait(5) + print("Entering Password") + logging.info("Entering Password") + report.step_start("Entering Password") + wifiPassword = driver.find_element_by_xpath("//*[@label='Password']") + wifiPassword.send_keys(wifi_pass) + except NoSuchElementException: + print("Enter Password Page Not Loaded") + logging.warning("Enter Password Page Not Loaded") + # ---------------------Set Password------------------------------- + + # ---------------------Click on join------------------------------- + try: + driver.implicitly_wait(4) + print("Selecting join") + report.step_start("Clicking JOIN") + joinBTN = driver.find_element_by_xpath("//*[@label='Join']") + joinBTN.click() + except Exception as e: + print("Join Button Not Enabled...Password may not be needed") + logging.warning("Join Button Not Enabled...Password may not be needed") + # ---------------------Click on join------------------------------- + + # ---------------------check if internet------------------------------- + try: + driver.implicitly_wait(5) + WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']") + # = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text + except Exception as e: + is_internet = True + print("No Wifi-AP Error Internet Error: " + wifi_name) + # Need to add Wait for Selected Wifi Xpath + # time.sleep(3) + # ---------------------check if internet------------------------------- + return is_internet, setup_perfectoMobile, ssid_found + + # Gets the IP Address of the connected SSID from Phone + def get_ip_address(self, ssid, setup_perfectoMobile, connData): + wifi_name = ssid + driver = setup_perfectoMobile[0] + report = setup_perfectoMobile[1] + # ---------------------Additional INFO------------------------------- + try: + driver.implicitly_wait(5) + print("Selecting SSID: ", wifi_name) + report.step_start("Additional details of SSID") + additional_details_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@label='" + wifi_name + "']"))) + # //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info'] + additional_details_element.click() + + try: + driver.implicitly_wait(2) + report.step_start("Checking SSID Name as Expected") + print("Checking SSID Name") + ssidname_text = driver.find_element_by_xpath("//*[@label='" + wifi_name + "']").text + print(ssidname_text) + if (ssidname_text == wifi_name): + print("SSID Matched") + logging.info("SSID Matched") + allure.attach(name="SSID Matched ", body=str(wifi_name)) + else: + print("SSID Not Matched") + logging.info("SSID Not Matched") + allure.attach(name="SSID Not Matched ", body=str(wifi_name)) + reportFlag = False + assert reportFlag + except: + print("SSID is not Checked in more Info") + logging.warning("SSID is not Checked in more Info") + try: + report.step_start("Checking WiFi Address") + print("Checking WIFI address") + # (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2] + wifi_address_element_text = driver.find_element_by_xpath( + "(//*[@label='Wi-Fi Address']/parent::*/XCUIElementTypeStaticText)[2]").text + print("wifi_address_element_text: ", wifi_address_element_text) + allure.attach(name="Connected SSID WiFi-Address: ", body=str(wifi_address_element_text)) + except Exception as e: + print("WiFi-Address not Found") + logging.warning("WiFi-Address not Found") + try: + time.sleep(4) + report.step_start("Checking IP Address") + print("Checking IP address") + logging.info("Checking IP address") + # (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2] + ip_address_element_text = driver.find_element_by_xpath( + "(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text + print("ip_address_element_text: ", ip_address_element_text) + except Exception as e: + try: + time.sleep(4) + print("Scrolling for checking ip address") + self.scrollDown(setup_perfectoMobile) + ip_address_element_text = driver.find_element_by_xpath( + "(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text + print("ip_address_element_text: ", ip_address_element_text) + except: + print("IP Address not Found") + logging.info("IP Address not Found") + except Exception as e: + print("Select Additional Info failed") + logging.warning("Select Additional Info failed") + # ---------------------Additional INFO------------------------------- + return ip_address_element_text + + def run_speed_test(self, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Verify Upload & Download Speed") + print("-------------------------------------") + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + current_result = True + + contexts = driver.contexts + # print("Printing Context") + # print(contexts) + + driver.switch_to.context('WEBVIEW_1') + time.sleep(5) + try: + print("Launching Safari") + report.step_start("Google Home Page") + time.sleep(4) + driver.get(connData["webURL"]) + print("Enter Search Text") + time.sleep(4) + driver.find_element_by_xpath("//*[@class='gLFyf']").send_keys("Internet speed test") + time.sleep(4) + driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[1]/div[1]").click() + except: + try: + print("Finding search option") + report.step_start("Input For Search") + driver.implicitly_wait(4) + driver.get(connData["webURL"]) + print("Enter Search Text") + driver.implicitly_wait(4) + element_find_txt = driver.find_element_by_xpath(connData["lblSearch"]) + element_find_txt.send_keys("Internet Speed Test") + except Exception as e: + print("Launching Safari Failed") + print(e) + + try: + print("Click Run Speed Test Button...") + report.step_start("Click Run Speed Test Button") + driver.implicitly_wait(4) + driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click() + except NoSuchElementException: + current_result = False + print("Run Speed Test Button element not found", NoSuchElementException) + return current_result + + # Get upload/Download Speed + try: + report.step_start("Get upload/Download Speed") + time.sleep(60) + download_mbps = driver.find_element_by_xpath(connData["downloadMbps"]) + download_speed = download_mbps.text + print("Download: " + download_speed + " Mbps") + + time.sleep(30) + upload_mbps = driver.find_element_by_xpath(connData["UploadMbps"]) + upload_speed = upload_mbps.text + print("Upload: " + upload_speed + " Mbps") + allure.attach(name="Speed Test logs: ", + body=str("Upload: " + upload_speed + " Mbps" + " Download: " + download_speed + " Mbps")) + print("Access Point Verification Completed Successfully") + + except NoSuchElementException: + print("Access Point Verification NOT Completed, checking Connection....") + current_result = False + return current_result + #----------Wifi connect for Enterprise Security--------------- + def wifi_connect_eap(self, ssid, user, ttls_passwd, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Select Wifi/Get IP Address IOS Connection") + print("-------------------------------------") + is_internet = False + wifi_name = ssid + ssid_found = False + print("Verifying Wifi/AP Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + # driver.switch_to.context(contexts[0]) + + report.step_start("Set Wifi Network to " + wifi_name) + # Open Settings Application + logging.info("Opening IOS setting APP") + self.openApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + try: + time.sleep(2) + driver.implicitly_wait(2) + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + logging.error("Exception: Verify Xpath - unable to click on Wifi") + + time.sleep(2) + driver.implicitly_wait(4) + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + try: + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("Switch is OFF") + logging.info("Wifi Switch is OFF") + + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + print("WIFI Switch is ON") + logging.info("Wifi Switch is ON") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is ON") + logging.info("Wifi Switch is ON") + if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0): + print("switch is still OFF") + logging.error("Wifi Switch is OFF") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + else: + print("Switch is Still OFF") + logging.error("Wifi Switch is OFF") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + except: + print("No switch element found") + logging.error("No switch element found") + except: + print("get_wifi_switch_element is ON") + logging.warning("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except: + print("Cannot find WIFI element") + logging.error("Cannot find WIFI element") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + + # ---------------------This is to Forget current connected SSID------------------------------- + # ---------------------This to Avoid any popup page from captive portal--------------------# + + try: + time.sleep(4) + print("getting in to Additional details") + report.step_start("Clicking More Info") + logging.info("getting in to Additional details") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + time.sleep(2) + print("Forget Connected Network") + logging.info("Forget Connected Network") + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid.click() + print("Forget old ssid") + logging.info("Forget old ssid") + try: + time.sleep(2) + report.step_start("Forget SSID popup1") + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + logging.warning("couldn't find forget ssid element") + except: + print("No connected SSID") + logging.info("No connected SSID") + try: + report.step_start("Unexpected Captive Popup") + print("Unexpeceted Captive Poped Up") + captive_portal_cancel_element = driver.find_element_by_xpath("//*[@label='Cancel']") + captive_portal_cancel_element.click() + time.sleep(2) + use_other_network_element = driver.find_element_by_xpath("//*[@label='Use Other Network']") + use_other_network_element.click() + time.sleep(2) + except: + print("No Captive Portal Popup Found") + try: + time.sleep(4) + print("getting in to Additional details") + report.step_start("Clicking More Info") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + time.sleep(2) + print("Forget Connected Network") + forget_ssid = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']"))) + forget_ssid.click() + print("Forget old ssid") + try: + time.sleep(2) + report.step_start("Forget SSID popup1") + forget_ssid_popup = WebDriverWait(driver, 30).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']"))) + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + except: + print("No connected SSID") + + # ---------------------This is to Forget current connected SSID------------------------------- + + # ---------------------To get all available SSID and select it------------------------------- + print("Searching for Wifi: " + wifi_name) + # allure.attach(name= body=str("Searching for Wifi: " + wifi_name)) + time.sleep(2) + report.step_start("Searching SSID") + print("Selecting Wifi: " + wifi_name) + ssid_found = False + available_ssids = False + + try: + for check_for_all_ssids in range(12): + available_ssids = self.get_all_available_ssids(driver) + allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) + try: + if (not self.ssid_Visible(driver, wifi_name)) or (wifi_name not in available_ssids): + self.scrollDown(setup_perfectoMobile) + time.sleep(2) + else: + try: + driver.implicitly_wait(8) + report.step_start("Selecting SSID To Connect") + ssid_found = True + print(wifi_name + " : Found in Device") + wifi_sel_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + wifi_name + "']"))) + print(wifi_sel_element) + wifi_sel_element.click() + print("Selecting SSID") + break + except: + print("SSID unable to select") + logging.error("Unable to select SSID") + report.step_start("Selecting Unable SSID To Connect") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + + except: + print("couldn't connect to " + wifi_name) + logging.error("Couldn't Find ssid") + # request.config.cache.set(key="SelectingWifiFailed", value=str(e)) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + pass + + if not ssid_found: + print("could not found " + wifi_name + " in device") + logging.error("Couldn't Find ssid in device") + self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + return is_internet, setup_perfectoMobile, ssid_found + except: + pass + # ---------------------To get all available SSID and select it------------------------------- + # Set username + # ------------------------------------------------------- + try: + driver.implicitly_wait(4) + report.step_start("Entering User") + print("Entering User name") + logging.info("Entering User name") + wifi_user_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Username']"))) + wifi_user_element.send_keys(user) + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + logging.error("Password Page Not Loaded, password May be cached in the System") + # ------------------------------------------------------- + + # ---------------------Set Password------------------------------- + try: + driver.implicitly_wait(4) + report.step_start("Entering Password") + print("Entering password") + wifi_password = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Password']"))) + wifi_password.send_keys(ttls_passwd) + except NoSuchElementException: + print("Enter Password Page Not Loaded") + logging.error("Enter Password Page Not Loaded") + # ---------------------Set Password------------------------------- + # ------------------------------------------------------- + + # ---------------------Click on join------------------------------- + try: + driver.implicitly_wait(4) + report.step_start("Clicking Join") + print("Clicking Join") + join_btn = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Join']"))) + join_btn.click() + except Exception as e: + print("Join Button Not Enabled...Password may not be needed") + logging.error("Join Button Not Enabled...Password may not be needed") + # ---------------------Click on join------------------------------- + # Selecting certificate + # ------------------------------------------------------- + try: + driver.implicitly_wait(4) + report.step_start("Clicking Trust CA Cert") + print("Clicking Trust CA Cert") + cert_element = WebDriverWait(driver, 45).until( + EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Trust']"))) + cert_element.click() + except NoSuchElementException: + print("Password Page Not Loaded, password May be cached in the System") + logging.error("Password Page Not Loaded, password May be cached in the System") + + # ---------------------check if internet------------------------------- + try: + driver.implicitly_wait(5) + wifi_internet_err_msg = driver.find_element_by_xpath("//*[@label='No Internet Connection']") + # = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text + except Exception as e: + is_internet = True + print("No Wifi-AP Error Internet Error: " + wifi_name) + logging.error("No Wifi-AP Error Internet Error: " + wifi_name) + # Need to add Wait for Selected Wifi Xpath + # time.sleep(3) + # ---------------------check if internet------------------------------- + return is_internet, setup_perfectoMobile, ssid_found + + def wifi_disconnect(self, ssid, setup_perfectoMobile, connData): + print("\n-------------------------------------") + print("Wifi Disconnect and Forget Connection") + print("-------------------------------------") + print("Verifying Wifi/AP Connection Details....") + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + report.step_start("Switching Driver Context") + print("Switching Context to Native") + driver.switch_to.context('NATIVE_APP') + # driver.switch_to.context(contexts[0]) + + report.step_start("Set Wifi Network to " + ssid) + # Open Settings Application + self.openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + try: + time.sleep(2) + driver.implicitly_wait(2) + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + + time.sleep(2) + driver.implicitly_wait(2) + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("switch is OFF") + + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + print("WIFI Switch is ON") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is ON") + if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0): + print("switch is still OFF") + self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + else: + print("Switch is Still OFF") + self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + except: + print("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + except: + print("Cannot find WIFI element") + self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + # ---------------------This is to Forget current connected SSID------------------------------- + + try: + print("getting in to Additional details") + additional_details_element = driver.find_element_by_xpath( + "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']") + additional_details_element.click() + try: + print("Forget Connected Network") + forget_ssid = driver.find_element_by_xpath("//*[@label='Forget This Network']") + forget_ssid.click() + print("Forget old ssid") + try: + report.step_start("Forget SSID popup1") + forget_ssid_popup = driver.find_element_by_xpath("//*[@label='Forget']") + forget_ssid_popup.click() + + print("**alert** Forget SSID popup killed **alert**") + except: + print("Forget SSID popup not found") + except: + print("couldn't find forget ssid element") + except: + print("No connected SSID") + + # ---------------------This is to Forget current connected SSID------------------------------- + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element_text = get_wifi_switch_element.text + print("switch state is : ", get_wifi_switch_element_text) + try: + if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + driver.implicitly_wait(1) + get_wifi_switch_element.click() + driver.implicitly_wait(1) + i = 0 + for i in range(5): + try: + get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("switch is ON") + + if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0: + print("WIFI Switch is OFF") + break + else: + try: + get_wifi_switch_element = driver.find_element_by_xpath( + "//*[@label='Wi-Fi' and @value='1']") + get_wifi_switch_element.click() + get_wifi_switch_element_text = get_wifi_switch_element.text + except: + print("WIFi switch is OFF") + + else: + print("Switch is Still OFF") + except: + pass + except: + print("get_wifi_switch_element is ON") + # --------------------To Turn on WIFi Switch if already OFF-------------------------------- + + + def toggle_wifi_mode(self,ssid, setup_perfectoMobile, connData): + print("\n-----------------------") + print("Toggle Wifi Mode") + print("-----------------------") + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + + try: # Disabling wifi-toggle button + time.sleep(2) + driver.implicitly_wait(2) + print("Disable Wifi Radio Btn") + report.step_start("Disable Wifi Radio Btn") + wifiRadioBTN_On = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']") + driver.implicitly_wait(1) + wifiRadioBTN_On.click() + driver.implicitly_wait(15) + # time.sleep(15) + except NoSuchElementException: + print("Wifi Radio Button Not Disabled...") + + try: # Enabling wifi-toggle button + time.sleep(2) + driver.implicitly_wait(2) + print("Enable Wifi Radio Btn") + report.step_start("Enable Wifi Radio Btn") + wifiRadioBTN_Off = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']") + driver.implicitly_wait(1) + wifiRadioBTN_Off.click() + driver.implicitly_wait(30) + #time.sleep(30) + except NoSuchElementException: + print("Wifi Radio Button Not Enabled...") + + try: # Checking whether connected to same ssid, after toggling wifi-button + print("Get Connected Wifi Name if any after Wifi Radio is Enabled") + report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") + driver.implicitly_wait(2) + WifiNameElement = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, "//AppiumAUT/XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeTable[1]/XCUIElementTypeCell[2]/XCUIElementTypeStaticText[1]"))) + Wifi_SSID_Name = WifiNameElement.text + print("Current Wifi Status Name: " + Wifi_SSID_Name) + except NoSuchElementException: + Wifi_SSID_Name = "Null" + print("Device did not connect back to Wifi: " + ssid) + + if Wifi_SSID_Name.__eq__(ssid): + WifiFlag = True + else: + WifiFlag = False + + return WifiFlag + + def toggle_airplane_mode(self, ssid, setup_perfectoMobile, connData): + print("\n-----------------------") + print("Toggle Airplane Mode") + print("-----------------------") + + report = setup_perfectoMobile[1] + driver = setup_perfectoMobile[0] + currentResult = True + + # Open Settings Application + self.openApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile) + + # Toggle Airplane Mode + print("Toggle Airplane Mode..") + report.step_start("Toggle Airplane Mode") + try: + AirplaneMode = driver.find_element_by_xpath("//XCUIElementTypeSwitch[@label='Airplane Mode']") + # Toggle Airplane Mode + AirplaneMode.click() + + # Verify Cellular Mode Text + report.step_start("Verify Cellular Mode") + try: + CellularMsgEle = driver.find_element_by_xpath("//*[@name='Airplane Mode' and @value='Airplane Mode']") + # ssertEqual(CellularMsgEle.text, "Airplane Mode", "Airplane Mode Not Triggerd") + print("Verify Cellular Mode Text: Airplane Mode Success") + except NoSuchElementException: + currentResult = False + print("Cellular Mode Not in Airplane Mode: ERROR") + + AirplaneMode.click() + except NoSuchElementException: + currentResult = False + print("Airplane Wifi Button not loaded...") + + report.step_start("Verify No Sim Card Installed Msg Popup") + print("Verify No Sim Card Installed Msg Popup..") + try: + NoSimCardErrorMsg = driver.find_element_by_xpath("//*[@value='No SIM Card Installed']") + except NoSuchElementException: + print("No Sim Card AlertMsg") + + print("Click ok on No Sim Card Msg Popup..") + report.step_start("Click ok on No Sim Card Msg Popup") + try: + NoSimCardErrorMsgOK = driver.find_element_by_xpath("//*[@label='OK']") + NoSimCardErrorMsgOK.click() + except NoSuchElementException: + print("No Sim Card AlertMsg") + + try: + print("Verifying Connected Wifi Connection") + report.step_start("Loading Wifi Page") + element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']") + element.click() + except NoSuchElementException: + print("Exception: Verify Xpath - unable to click on Wifi") + logging.error("Exception: Verify Xpath - unable to click on Wifi") + + wifi_name = ssid + # ---------------------Additional INFO------------------------------- + try: + driver.implicitly_wait(5) + print("Selecting SSID: ", wifi_name) + report.step_start("Additional details of SSID") + additional_details_element = WebDriverWait(driver, 35).until( + EC.presence_of_element_located((MobileBy.XPATH, + "//*[@label='" + wifi_name + "']"))) + # //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info'] + additional_details_element.click() + + try: + driver.implicitly_wait(2) + report.step_start("Checking SSID Name as Expected") + print("Checking SSID Name") + ssid_name_text = driver.find_element_by_xpath("//*[@label='" + wifi_name + "']").text + print(ssid_name_text) + if (ssid_name_text == wifi_name): + print("SSID Matched") + logging.info("SSID Matched") + allure.attach(name="SSID Matched ", body=str(wifi_name)) + else: + print("SSID Not Matched") + logging.info("SSID Not Matched") + allure.attach(name="SSID Not Matched ", body=str(wifi_name)) + reportFlag = False + assert reportFlag + except: + print("SSID is not Checked in more Info") + logging.warning("SSID is not Checked in more Info") + except Exception as e: + print("Select Additional Info failed") + logging.warning("Select Additional Info failed") + + if ssid.__eq__(ssid_name_text): + return True + else: + return False + +if __name__ == '__main__': + perfecto_data = { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL": "tip", + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + } + } + access_point = [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "upstream_port": "1.1.eth1", + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "candela6ghz", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "hello123", + "2g-encryption": "WPA2", + "5g-encryption": "open", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31 ", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae255", + "serial_port": True, + "host_ip": "10.28.3.102", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }] + obj = ios_libs() \ No newline at end of file diff --git a/libs/perfecto_interop/ios_tests.py b/libs/perfecto_interop/ios_tests.py new file mode 100644 index 000000000..1e52ec214 --- /dev/null +++ b/libs/perfecto_interop/ios_tests.py @@ -0,0 +1,387 @@ +""" +This file contains functions that represents the Tests we can run on AP using Perfecto real clients +some tests are Client connectivity (For General and Enterprise Security) , Rate Limiting, Captive Portal, MultiPSK +Most of the Functions used are inherited from iOS Libs which consists of Perfecto related Library Functions +Base functions used for all the tests are Wifi_connect and Wifi_disconnect +Wifi_connect is used to connect to a particular ssid that is passed as an argument on the real client +Wifi_disconnect is used to disconnect and forget that particular ssid that is passed as an argument on the real client +get_ip_address is used to get the ip address from the client of the connected ssid +speed_test is used to run the speed test on OOKLA speed test app +""" +from ios_libs import ios_libs + + +class ios_tests(ios_libs): + ios_devices = { + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + } + } + + def __init__(self, perfecto_data=None, dut_data=None, device=None, testcase=None): + self.perfecto_data = perfecto_data + self.dut_data = dut_data + self.device = device + self.testcase_name = testcase + self.connData = self.get_ToggleAirplaneMode_data(get_device_configuration=self.perfecto_data[device]) + + def client_connect(self, ssid, passkey): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + ip_address = self.get_ip_address(ssid, setup, self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + print(ip_address, ssid_with_internet) + if ip_address is not None: + return "PASS", "Device got the IP address" + else: + return "FAIL", "Device didn't get the IP address" + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + return "FAIL", "SSID didn't get the Internet" + self.teardown() + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_client_connect(self, ssid, identity, ttls_passwd): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + ip_address = self.get_ip_address(ssid, setup, self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + print(ip_address, ssid_with_internet) + if ip_address is not None: + return "PASS", "Device got the IP address" + else: + return "FAIL", "Device didn't get the IP address" + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + return "FAIL", "SSID didn't get the Internet" + self.teardown() + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def client_connectivity_test(self, ssid, security=None, dut_data=None, passkey=None, mode=None, band=None, num_sta=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + current_result = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if current_result is True: + return "PASS", "Device connected to SSID and ran Internet speed test" + else: + return "Fail", "Device didn't get connected to SSID" + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + return "FAIL", "SSID didn't get the Internet" + self.teardown() + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_client_connectivity_test(self, ssid, security=None, extra_securities=None, mode=None, band=None, + eap=None, ttls_passwd=None, identity=None, num_sta=None, dut_data=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + current_result = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if current_result is True: + return "PASS", "Device connected to SSID and ran Internet speed test" + else: + return "Fail", "Device didn't get connected to SSID" + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + return "FAIL", "SSID didn't get the Internet" + self.teardown() + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def rate_limiting_test(self, ssid_name, passkey, up_rate, down_rate, instance_name=None, mode=None,download_rate=None, + batch_size=None, upload_rate=None, protocol=None, duration=None, move_to_influx=None, + dut_data=None, num_stations=None): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid_name, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + try: + if ssid_with_internet is not None and ssid_found is True: + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + down_speed, up_speed = self.speed_test(setup_perfecto_mobile) + self.wifi_disconnect(ssid=ssid_name, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if down_speed is not None and up_speed is not None: + if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): + return "PASS", "Device connected to SSID and ran rate-limiting test" + else: + return "Fail", "Failed Rate-limiting test" + else: + return "Fail", "Device didn't get connected to SSID" + self.teardown() + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def toggle_wifi_mode_test(self, ssid, passkey): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + wifi_toggleing = self.toggle_wifi_mode(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if wifi_toggleing is True: + return "PASS", "Connected to same ssid, after toggling the wifi button." + else: + return "FAIL", "Not connected to same ssid, after toggling the wifi button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_toggle_wifi_mode_test(self, ssid, identity, ttls_passwd): + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, + ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is not None and ssid_found is True: + wifi_toggleing = self.toggle_wifi_mode(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if wifi_toggleing is True: + return "PASS", "Connected to same ssid, after toggling the wifi button." + else: + return "FAIL", "Not connected to same ssid, after toggling the wifi button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def toggle_airplane_mode_test(self, ssid, passkey): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect(ssid=ssid, passkey=passkey, setup_perfectoMobile= + setup_perfecto_mobile, connData=self.connData) + if ssid_with_internet is True and ssid_found is True: + # ip_address = self.get_ip_address(ssid, setup, self.connData) + airplane_toggling = self.toggle_airplane_mode(ssid=ssid, setup_perfectoMobile=setup, connData=self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if airplane_toggling is True: + return "PASS", "Connected to same ssid, after toggling the airplane button." + else: + return "FAIL", "Not connected to same ssid, after toggling the airplane button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + + def enterprise_toggle_airplane_mode_test(self, ssid, identity, ttls_passwd): + global ip_address + self.setup_perfectoMobile = list(self.setup_perfectoMobile_iOS(get_device_configuration= + self.perfecto_data[self.device], + perfecto_data=self.perfecto_data)) + setup_perfecto_mobile = self.setup_perfectoMobile[0] + try: + ssid_with_internet, setup, ssid_found = self.wifi_connect_eap(ssid=ssid, user=identity, + ttls_passwd=ttls_passwd, + setup_perfectoMobile=setup_perfecto_mobile, + connData=self.connData) + if ssid_with_internet is True and ssid_found is True: + airplane_toggling = self.toggle_airplane_mode(ssid=ssid, setup_perfectoMobile=setup, connData=self.connData) + self.closeApp(self.connData["bundleId-iOS-Settings"], setup) + self.wifi_disconnect(ssid=ssid, setup_perfectoMobile=setup_perfecto_mobile, connData=self.connData) + self.teardown() + if airplane_toggling is True: + return "PASS", "Connected to same ssid, after toggling the airplane button." + else: + return "FAIL", "Not connected to same ssid, after toggling the airplane button." + elif ssid_found is False: + self.teardown() + return "FAIL", "SSID is not seen in Device" + else: + self.teardown() + return "FAIL", "SSID didn't get the Internet" + except Exception as e: + print(e) + self.teardown() + return "Fail", "Failed due to exception or Unable to find the API path" + +if __name__ == '__main__': + perfecto_data = { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL": "tip", + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + }, + "iPhone-7": { + "model-iOS": "iPhone-7", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-7", + "jobNumber": 38 + } + } + access_point = [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "upstream_port": "1.1.eth1", + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "candela6ghz", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "hello123", + "2g-encryption": "WPA2", + "5g-encryption": "open", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31 ", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae255", + "serial_port": True, + "host_ip": "10.28.3.102", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }] + obj = ios_tests(perfecto_data=perfecto_data, dut_data=access_point,device="iPhone-7", + testcase="Test_perfecto_check") + # print(obj.client_connectivity_test(ssid="ssid_wpa2_2g_RL_E3V2240", passkey="something")) + # print(obj.rate_limiting_test(ssid="ssid_wpa2_2g_RL_1VE7537",passkey="something",up_rate="60",down_rate="10")) + #print(obj.enterprise_client_connect(ssid="ssid_wpa2_eap_5g", identity="nolaradius", ttls_passwd="nolastart")) + print(obj.enterprise_toggle_wifi_mode_test(ssid="ssid_wpa_eap_5g_5O05610", identity="nolaradius", + ttls_passwd="nolastart")) + diff --git a/libs/perfecto_interop/perfecto_interop.py b/libs/perfecto_interop/perfecto_interop.py new file mode 100644 index 000000000..930c89598 --- /dev/null +++ b/libs/perfecto_interop/perfecto_interop.py @@ -0,0 +1,388 @@ +import importlib +import logging +import time +import warnings +from time import gmtime, strftime +from xml.etree import ElementTree as ET + +import pytest +import requests +import urllib3 +from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient, TestContext, TestResultFactory) +from perfecto.model.model import Job, Project + +android_tests = importlib.import_module("android_tests") +ios_tests = importlib.import_module("ios_tests") + + +class perfecto_interop: + dut_data = list() + security_token = None + perfecto_data = dict() + android_devices = { + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + }, + "Galaxy S10.*": { + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10", + "jobNumber": 38 + }, + "Galaxy S9": { + "platformName-android": "Android", + "model-android": "Galaxy S9", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S9", + "jobNumber": 38 + }, + "Pixel 4": { + "platformName-android": "Android", + "model-android": "Pixel 4", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-pixel-4", + "jobNumber": 38 + } + } + ios_devices = { + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + }, + "iPhone-12": { + "model-iOS": "iPhone-12", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-12", + "jobNumber": 38 + }, + "iPhone-7": { + "model-iOS": "iPhone-7", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-7", + "jobNumber": 38 + }, + "iPhone-XR": { + "model-iOS": "iPhone-XR", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-XR", + "jobNumber": 38 + } + } + + def __init__(self, perfecto_data=None, dut_data=None): + if perfecto_data is None: + logging.error("Perfecto data is not provided") + pytest.exit("Perfecto data is not provided") + if dut_data is None: + logging.error("Device Under Test data is not provided") + pytest.exit("Device Under Test data is not provided") + self.perfecto_data = perfecto_data + self.dut_data = dut_data + + def setup_metadata(self): + pass + + def get_device_configuration(self): + return self.perfecto_data["iPhone-11"] + + # def get_PassPointConniOS_data(self, get_device_configuration): + # passPoint_data = { + # "netAnalyzer-inter-Con-Xpath": "//*[@label='Network Connected']/parent::*/XCUIElementTypeButton", + # "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + # "bundleId-iOS-Ping": get_device_configuration["bundleId-iOS-Ping"] + # } + # yield passPoint_data + + # def get_APToMobileDevice_data(get_device_configuration): + # passPoint_data = { + # "webURL": "https://www.google.com", + # "lblSearch": "//*[@class='gLFyf']", + # "elelSearch": "(//*[@class='sbic sb43'])[1]", + # "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", + # "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + # "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], + # "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", + # "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", + # # Android + # "platformName-android": get_device_configuration["platformName-android"], + # "appPackage-android": get_device_configuration["appPackage-android"] + # } + # yield passPoint_data + + # def get_AccessPointConn_data(get_device_configuration): + # passPoint_data = { + # "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + # "bundleId-iOS-Ping": get_device_configuration["bundleId-iOS-Ping"] + # } + # yield passPoint_data + + def get_ToggleAirplaneMode_data(self, get_device_configuration): + passPoint_data = { + "webURL": "https://www.google.com", + "lblSearch": "//*[@class='gLFyf']", + "elelSearch": "(//*[@class='sbic sb43'])[1]", + "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", + "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], + "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", + "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", + # Android + "platformName-android": get_device_configuration["platformName-android"], + "appPackage-android": get_device_configuration["appPackage-android"] + } + return passPoint_data + + # def get_ToggleWifiMode_data(get_device_configuration): + # passPoint_data = { + # # iOS + # "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], + # # Android + # "platformName-android": get_device_configuration["platformName-android"], + # "appPackage-android": get_device_configuration["appPackage-android"] + # } + # yield passPoint_data + + def report_client(self, value): + global reporting_client # declare a to be a global + reporting_client = value # this sets the global value of a + + def reportPerfecto(testCaseName, testCaseStatus, testErrorMsg, reportURL): + global testCaseNameList # declare a to be a global + global testCaseStatusList + global testCaseErrorMsg + global testCaseReportURL + + testCaseNameList.append(testCaseName) + testCaseStatusList.append(testCaseStatus) + testCaseErrorMsg.append(str(testErrorMsg)) + testCaseReportURL.append(reportURL) + + def setup_perfectoMobileWeb(self, get_device_configuration): + from selenium import webdriver + rdriver = None + reporting_client = None + + warnings.simplefilter("ignore", ResourceWarning) + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + capabilities = { + 'platformName': get_device_configuration["platformName-iOS"], + 'model': get_device_configuration["model-iOS"], + 'browserName': get_device_configuration["browserType-iOS"], + 'securityToken': get_device_configuration["securityToken"], + } + + if not self.is_device_available_timeout(capabilities['model']): + print("Unable to get device.") + pytest.exit("Exiting Pytest") + + rdriver = webdriver.Remote( + 'https://' + self.perfecto_data["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', + capabilities) + rdriver.implicitly_wait(2) + + projectname = self.perfecto_data["projectName"] + projectversion = self.perfecto_data["projectVersion"] + jobname = get_device_configuration["jobName"] + jobnumber = get_device_configuration["jobNumber"] + tags = self.perfecto_data["reportTags"] + testCaseName = get_device_configuration["jobName"] + + print("Setting Perfecto ReportClient....") + perfecto_execution_context = PerfectoExecutionContext(rdriver, tags, Job(jobname, jobnumber), + Project(projectname, projectversion)) + reporting_client = PerfectoReportiumClient(perfecto_execution_context) + reporting_client.test_start(testCaseName, TestContext([], "Perforce")) + + def teardown(): + try: + print(" -- Tear Down --") + reporting_client.test_stop(TestResultFactory.create_success()) + print('Report-Url: ' + reporting_client.report_url() + '\n') + rdriver.close() + except Exception as e: + print(" -- Exception Not Able To close --") + print(e.message) + finally: + try: + rdriver.quit() + except Exception as e: + print(" -- Exception Not Able To Quit --") + print(e.message) + + # request.addfinalizer(teardown) + + if rdriver is None: + yield -1 + else: + yield rdriver, reporting_client + + # Does HTTP GET request to Perfecto cloud and gets response and information related to a headset + def response_device(self, model): + securityToken = self.perfecto_data["securityToken"] + perfectoURL = self.perfecto_data["perfectoURL"] + url = f"https://{perfectoURL}.perfectomobile.com/services/handsets?operation=list&securityToken={securityToken}&model={model}" + resp = requests.get(url=url) + return ET.fromstring(resp.content) + + # Get an attribute value from the handset response + def get_attribute_device(self, responseXml, attribute): + try: + return responseXml.find('handset').find(attribute).text + except: + print(f"Unable to get value of {attribute} from response") + return "" + + # Checks to see if a particular handset is available + def is_device_available(self, model): + try: + responseXml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + device_available = self.get_attribute_device(responseXml, 'available') + print("Result:" + device_available) + if device_available == 'true': + return True + else: + allocated_to = self.get_attribute_device(responseXml, 'allocatedTo') + print("The device is currently allocated to:" + allocated_to) + return False + + # Checks whether the device is available or not.If the device is not available rechecks depending upon the + + # Checks whether the device is available or not.If the device is not available rechecks depending upon the + # 'timerValue' and 'timerThreshold' values.With the current parameters it will check after:10,20,40,80 mins. + def is_device_Available_timeout(self, model): + device_available = self.is_device_available(model) + timerValue = 5 + timerThreshold = 80 + if not device_available: + while (timerValue <= timerThreshold): + print("Last checked at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + print(f"Waiting for: {timerValue} min(s)") + time.sleep(timerValue * 60) + print("Checking now at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) + device_available = self.is_device_available(model) + if (device_available): + return True + else: + timerValue = timerValue + 5 + + if (timerValue > timerThreshold): + return False + else: + return True + else: + return True + + def get_device_attribuites(self, model, attribute): + try: + responseXml = self.response_device(model) + except: + print("Unable to get response.") + raise Exception("Unable to get response.") + try: + attribute_value = self.get_attribute_device(responseXml, str(attribute)) + except: + attribute_value = False + return attribute_value + + +if __name__ == '__main__': + perfecto_data = { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL": "tip", + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + } + } + access_point = [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "upstream_port": "1.1.eth1", + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "candela6ghz", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "hello123", + "2g-encryption": "WPA2", + "5g-encryption": "open", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31 ", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae255", + "serial_port": True, + "host_ip": "10.28.3.102", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }] + + obj = perfecto_interop(perfecto_data=perfecto_data, dut_data=access_point) + x = obj.get_device_configuration() + obj.setup_perfectoMobile_android() diff --git a/libs/perfecto_interop/setup.py b/libs/perfecto_interop/setup.py new file mode 100644 index 000000000..6eb2dae32 --- /dev/null +++ b/libs/perfecto_interop/setup.py @@ -0,0 +1,21 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name='perfecto_interop', + version='0.1', + scripts=["perfecto_interop.py", "android_libs.py", "ios_libs.py", "android_tests.py", "ios_tests.py"], + author="Shivam Thakur", + author_email="shivam.thakur@candelatech.com", + description="TIP OpenWIFI Perfecto Test Automation", + long_description=long_description, + long_description_content_type="text/markdown", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) diff --git a/libs/perfecto_libs/android_lib.py b/libs/perfecto_libs/android_lib.py deleted file mode 100644 index 9f604fcfa..000000000 --- a/libs/perfecto_libs/android_lib.py +++ /dev/null @@ -1,7565 +0,0 @@ -""" - Controller Library - 1. controller_data/sdk_base_url - 2. login credentials -""" -import datetime -import sys -import os -import time -import warnings -from _pytest.outcomes import xfail -import urllib3 -from perfecto.model.model import Job, Project -from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient,TestContext, TestResultFactory) -import pytest -import logging -import re -from selenium.common.exceptions import NoSuchElementException, TimeoutException -from selenium.webdriver.common.by import By -from selenium.webdriver.support.ui import WebDriverWait -from appium.webdriver.common.mobileby import MobileBy -from selenium.webdriver.support import expected_conditions as EC -from appium import webdriver - -import allure - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "tests" not in sys.path: - sys.path.append(f'../../tests') - -try: - from configparser import ConfigParser -except ImportError: - from ConfigParser import ConfigParser # ver. < 3.0 - -def openApp(appName, setup_perfectoMobile): - print("Refreshing App: " + appName) - setup_perfectoMobile[1].step_start("Opening App: " + appName) - params = {'identifier': appName} - #Open/Close/Open Action is performed to ensure the app is back to its Original Settings - setup_perfectoMobile[0].execute_script('mobile:application:open', params) - setup_perfectoMobile[0].execute_script('mobile:application:close', params) - setup_perfectoMobile[0].execute_script('mobile:application:open', params) - -def closeApp(appName, setup_perfectoMobile): - print("Closing App.." + appName) - setup_perfectoMobile[1].step_start("Closing App: " + appName) - params = {'identifier': appName} - setup_perfectoMobile[0].execute_script('mobile:application:close', params) - print("Closed App") - -def scrollDown(setup_perfectoMobile): - print("Scroll Down") - setup_perfectoMobile[1].step_start("Scroll Down") - params2 = {} - params2["start"] = "50%,90%" - params2["end"] = "50%,20%" - params2["duration"] = "4" - # time.sleep(2) - setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) - time.sleep(3) - - -def getDeviceID(setup_perfectoMobile): - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Get DeviceID") - params = {'property': 'deviceId'} - deviceID = driver.execute_script('mobile:handset:info', params) - print("DeviceID: " + deviceID) - return deviceID - -def getDeviceModelName(setup_perfectoMobile): - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Device Model Name") - params = {'property': 'model'} - deviceModel = driver.execute_script('mobile:handset:info', params) - print("ModelName: " + deviceModel) - return deviceModel - -def set_APconnMobileDevice_android(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi/AP Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print ("Selected Device Model: " + deviceModelName) - - if deviceModelName!=("Pixel 4"): - - report.step_start("Set Wifi Network to " + WifiName) - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - try: - print("Get Connected Wifi Name if any") - report.step_start("Get Connected Wifi Name if any") - try: - driver.implicitly_wait(20) - WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']") - Wifi_AP_Name = WifiNameElement.text - print("Current Wifi Status Name: " + Wifi_AP_Name) - except NoSuchElementException: - report.step_start("Checking Wifi Radio Button Status") - try: - driver.implicitly_wait(5) - WifiRadioBtnConnections = driver.find_element_by_xpath("//*[@resource-id='android:id/switch_widget' and @content-desc='Wi-Fi' and @text='Off']") - report.step_start("Wifi Radio Button Disabled, Enabling Radio Button..") - print("Wifi Radio Button Disabled, Enabling Radio Button..") - WifiRadioBtnConnections.click() - except NoSuchElementException: - Wifi_AP_Name="Null" - driver.implicitly_wait(25) - report.step_start("Wifi Radio Button Already Enabled") - print("Wifi Radio Button Already Enabled") - - except NoSuchElementException: - Wifi_AP_Name="Null" - print("Device not connected to any Wifi") - - report.step_start("Clicking Wi-Fi") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - Wifi_AP_Name="" - - if Wifi_AP_Name.__eq__(WifiName): - print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']") - print("Wifi Successfully Connected") - - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - else: - - #print("Set Wifi Radio Button to enabled") - #try: - # report.step_start("Set Wifi Radio Button to enabled") - # wifiRadioBtn = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget' and @text='Wi-Fi, Off']") - # wifiRadioBtn.click() - # except NoSuchElementException: - # report.step_start("Set Wifi Radio Button Already enabled") - # print("Radio button Already Enabled") - - print("Selecting Wifi: " + WifiName) - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='"+ WifiName + "']"))) - wifiSelectionElement.click() - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - assert False - - #Set password if Needed - try: - report.step_start("Set Wifi Password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/edittext']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - - try: - report.step_start("Click Connect Button") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected") - - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - else: - - report.step_start("Set Wifi Network to Pixel" + WifiName) - try: - print("Click Network & Internet") - report.step_start("Click Network & Internet") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - print("Get Connected Wifi Name if any") - report.step_start("Get Connected Wifi Name if any") - WifiNameElement = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='android:id/title' and @text='Wi‑Fi']/parent::*/android.widget.TextView[@resource-id='android:id/summary']"))) - Wifi_AP_Name = WifiNameElement.text - print("Current Wifi Status Name: " + Wifi_AP_Name) - WifiNameElement.click() - except NoSuchElementException: - Wifi_AP_Name="Null" - print("Device not connected to any Wifi") - - if Wifi_AP_Name.__eq__(WifiName): - print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']") - print("Wifi Successfully Connected") - - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - else: - - print("Set Wifi Radio Button to enabled") - try: - report.step_start("Set Wifi Radio Button to enabled") - wifiRadioBtn = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget' and @text='OFF']") - wifiRadioBtn.click() - except NoSuchElementException: - report.step_start("Set Wifi Radio Button Already enabled") - print("Radio button Already Enabled") - - print("Selecting Wifi: " + WifiName) - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='"+ WifiName + "']"))) - wifiSelectionElement.click() - except NoSuchElementException: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - - #Set password if Needed - try: - report.step_start("Set Wifi Password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - - try: - report.step_start("Click Connect Button") - joinBTNElement = driver.find_element_by_xpath("//*[@resource-id='android:id/button1' and @text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected") - - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - -def ForgetWifiConnection(request, setup_perfectoMobile, WifiName, connData): - print("\n-----------------------------") - print("Forget Wifi/AP Connection") - print("-----------------------------") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - driver.switch_to.context('NATIVE_APP') - contexts = driver.contexts - #print(contexts) - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print ("Selected Device Model: " + deviceModelName) - - if deviceModelName!=("Pixel 4"): - - report.step_start("Forget Existing Wifi" + WifiName) - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - print("Connected Wifi Name if any") - report.step_start("Get Connected Wifi Name if any") - WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']") - Wifi_AP_Name = WifiNameElement.text - print("Connected to Wifi: " + Wifi_AP_Name) - except NoSuchElementException: - Wifi_AP_Name="Null" - print("Device not connected to any Wifi") - - report.step_start("Clicking Wi-Fi") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - - if Wifi_AP_Name.__eq__(WifiName): - report.step_start("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - - print("Load Wifi Details Page") - try: - report.step_start("Load Wifi Details Page") - WifiInternetDetails = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/wifi_details']") - WifiInternetDetails.click() - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - print("Forget Wifi Network") - try: - report.step_start("Forget Wifi Network") - WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/smallLabel' and @text='Forget']") - WifiForget.click() - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - print("Verify if wifi is disconnected from: " + WifiName) - try: - report.step_start("Verify if wifi is disconnected from: " + WifiName) - WifiDisconnect = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']") - print("Wifi Not disconnected, check xpath for: " + WifiName) - assert False - except Exception as e: - assert True - print("Wifi Disconnected Successfully: " + WifiName) - - else: - print("Wifi Does not Match with Wifi: " + WifiName) - report.step_start("Wifi Does not Match with Wifi: " + WifiName) - report.step_start("Probably wifi auto connected to another network") - try: - report.step_start("Wifi Details Page") - WifiInternetDetails = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/wifi_details']") - WifiInternetDetails.click() - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - try: - report.step_start("Forget Wifi Network") - WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/smallLabel' and @text='Forget']") - WifiForget.click() - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - print("Verify if wifi is disconnected from: " + WifiName) - try: - report.step_start("Verify if wifi is disconnected from: " + WifiName) - #WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']") - print("Wifi Not disconnected, check xpath for: " + WifiName) - WifiForget = WebDriverWait(driver, 20).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - except Exception as e: - assert True - print("Wifi Disconnected Successfully: " + WifiName) - - else: - #print("Pixel Custom Code") - report.step_start("Forget Wifi Network on Pixel" + WifiName) - try: - print("Click Network & Internet") - report.step_start("Click Network & Internet") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - print("Get Connected Wifi Name if any") - report.step_start("Get Connected Wifi Name if any") - WifiNameElement = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='android:id/title' and @text='Wi‑Fi']/parent::*/android.widget.TextView[@resource-id='android:id/summary']"))) - Wifi_AP_Name = WifiNameElement.text - print("Current Wifi Status Name: " + Wifi_AP_Name) - WifiNameElement.click() - except NoSuchElementException: - Wifi_AP_Name="Null" - print("Device not connected to any Wifi") - - - #print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name) - try: - report.step_start("Wifi More information") - WifiInternetMoreSettings = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/settings_button_no_background']") - WifiInternetMoreSettings.click() - except NoSuchElementException: - print("Wifi Not Connected to any Wifi Error: " + WifiName) - - try: - report.step_start("Forget Wifi Network") - WifiInternetMoreSettings = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/button1' and @text='Forget']") - WifiInternetMoreSettings.click() - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - - - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']") - print("Forgot Wifi Error, check xpath") - except Exception as e: - print("Wifi Disconnected Successfully: " + WifiName) - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - -def Toggle_AirplaneMode_android(request, setup_perfectoMobile, connData): - print("\n-----------------------") - print("Toggle Airplane Mode") - print("-----------------------") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - driver.switch_to.context('NATIVE_APP') - contexts = driver.contexts - #print(contexts) - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print ("Selected Device Model: " + deviceModelName) - - airplaneFlag = False - - report.step_start("Click Connections") - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - report.step_start("Toggle Airplane Mode to On") - print("Toggle Airplane Mode to On") - ToggleAirplanEle = driver.find_element_by_xpath("//*[@content-desc='Airplane mode' and @text='Off']") - ToggleAirplanEle.click() - airplaneFlag = True - - print("Toggle Airplane Mode to Off") - ToggleAirplanEle2 = driver.find_element_by_xpath("//*[@content-desc='Airplane mode' and @text='On']") - ToggleAirplanEle2.click() - except NoSuchElementException: - print("Toggle Airplane Exception, Airplane mode may be on Already.") - - try: - print("Checking to see if Airplane is already enabled") - report.step_start("Checking to see if Airplane is already enabled") - connElement = driver.find_element_by_xpath("//*[@content-desc='Airplane mode' and @text='On']") - airplaneFlag = True - report.step_start("Disable Airplane Mode") - connElement.click() - - except NoSuchElementException: - print("Airplane Mode is On & Off status elements Error, please check xpath or if the Page Loaded") - - return airplaneFlag - -def Toggle_WifiMode_android(request, setup_perfectoMobile, WifiName, connData): - print("\n-----------------------") - print("Toggle Wifi Mode") - print("-----------------------") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - driver.switch_to.context('NATIVE_APP') - contexts = driver.contexts - #print(contexts) - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print ("Selected Device Model: " + deviceModelName) - - WifiFlag = False - - try: - report.step_start("Click Connections") - print("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - print("Get Connected Wifi Name if any") - report.step_start("Get Connected Wifi Name if any") - WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']") - Wifi_AP_Name = WifiNameElement.text - print("Current Wifi Status Name: " + Wifi_AP_Name) - except NoSuchElementException: - Wifi_AP_Name="Null" - print("Device not connected to any Wifi") - - print("Current Selected Wifi: " + Wifi_AP_Name) - report.step_start("Current Selected Wifi: " + Wifi_AP_Name) - - try: - report.step_start("Disable Wifi Radio Button") - print("Disable Wifi Radio Button") - connElement = driver.find_element_by_xpath("//*[@content-desc='Wi-Fi' and @text='On']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") - - try: - print("Get Connected Wifi Name if any after Wifi Radio is disabled") - report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") - WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']") - Wifi_AP_Name2 = WifiNameElement.text - print("Device Connected to Wifi: " + Wifi_AP_Name2) - except NoSuchElementException: - Wifi_AP_Name2="Null" - print("Device connected to Wifi: " + Wifi_AP_Name2) - - try: - report.step_start("Enable Wifi Radio Button") - print("Enable Wifi Radio Button") - wifiRadioBTN_Off = driver.find_element_by_xpath("//*[@content-desc='Wi-Fi' and @text='Off']") - wifiRadioBTN_Off.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Wifi Radio Button") - - try: - print("Get Connected Wifi Name if any after Wifi Radio is Enabled") - report.step_start("Get Connected Wifi Name if any after Wifi Radio is disabled") - WifiNameElement3 = WebDriverWait(driver, 35).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='android:id/summary']"))) - Wifi_AP_Name3 = WifiNameElement3.text - print("Current Wifi Status Name: " + Wifi_AP_Name3) - except NoSuchElementException and TimeoutException: - Wifi_AP_Name3="Null" - print("Device did not connect back to Wifi: " + WifiName) - - if Wifi_AP_Name3.__eq__(WifiName): - WifiFlag = True - else: - WifiFlag = False - - return WifiFlag - -def verifyUploadDownloadSpeed_android(request, setup_perfectoMobile, get_APToMobileDevice_data): - print("\n-------------------------------------") - print("Verify Upload & Download Speed") - print("-------------------------------------") - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - connData = get_APToMobileDevice_data - - currentResult=False - - driver.switch_to.context('WEBVIEW_1') - - try: - print("Launching Chrome") - report.step_start("Google Home Page") - driver.get(connData["webURL"]) - print("Enter Search Text") - elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"]) - elementFindTxt.send_keys("Internet Speed Test") - except Exception as e: - print("Launching Chrome Failed") - print (e) - # allure.attach(name="Speed Test logs: ", body=str("Launching Safari Failed")) - # allure.attach(name="Speed Test logs: ", body=str("Error log: " + e)) - - try: - print("Click Search Button") - report.step_start("Click Search Button") - time.sleep(2) - driver.implicitly_wait(2) - elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") - elelSearch.click() - print("Keyboard enter") - driver.press_keycode(66) - except: - try: - time.sleep(2) - driver.implicitly_wait(2) - elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") - elelSearch.click() - except: - print("Search Drop Down not active...") - return False - - try: - print("Click Run Speed Test Button...") - report.step_start("Click Run Speed Test Button") - driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click() - except NoSuchElementException: - print("Error in speed test element ", NoSuchElementException) - # allure.attach(name="Speed Test logs: ", body=str("Search Run Speed Test not active..." + NoSuchElementException)) - return False - - #Get upload/Download Speed - try: - print("Get Download Speed") - report.step_start("Get upload/Download Speed") - time.sleep(60) - downloadMbps = driver.find_element_by_xpath(connData["downloadMbps"]) - downloadSpeed = downloadMbps.text - print("Download: " + downloadSpeed + " Mbps") - - print("Get Upload Speed") - report.step_start("Get Upload Speed") - UploadMbps = driver.find_element_by_xpath(connData["UploadMbps"]) - uploadSpeed = UploadMbps.text - print("Upload: " + uploadSpeed + " Mbps") - allure.attach(name="Speed Test logs: ", body=str("Upload: " + uploadSpeed + " Mbps" + " Download: " + downloadSpeed + " Mbps")) - print("Access Point Verification Completed Successfully") - currentResult = True - except NoSuchElementException: - print("Access Point Verification NOT Completed, checking Connection....") - - return currentResult - -def downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Installing Android Profile ") - print("-------------------------------------") - - OpenRoamingWifiName = "" - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - driver.switch_to.context('WEBVIEW_1') - - print("Launching Chrome with OpenRoaming Profile") - report.step_start("Open Roaming Download Page") - driver.get(profileDownloadURL) - - try: - print("Accept Popup") - report.step_start("Accept Popup") - driver.switch_to.context('NATIVE_APP') - WebDriverWait(driver, 40).until(EC.alert_is_present(), 'Time out confirmation popup to appear') - alert = driver.switch_to.alert - alert.accept() - print("Alert Accepted") - except TimeoutException: - print("no alert") - #//*[@resource-id="android:id/button1"] - #Open Settings Application - #openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile) - -def deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile, connData): - print("\n-----------------------------") - print("Delete Open Roaming Profile") - print("-----------------------------") - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - driver.switch_to.context('NATIVE_APP') - contexts = driver.contexts - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - - if deviceModelName!=("Pixel 4"): - #Not a pixel Device - print ("Selected Device Model: " + deviceModelName) - report.step_start("Forget Profile: " + profileName) - - # three dotss - #//*[@resource-id='com.android.settings:id/round_corner'] - try: - print("Click Connections") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - try: - report.step_start("Clicking Wi-Fi") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - except NoSuchElementException: - print("Exception: Clicking Wi-Fi - Update/check Xpath for Click Wifi Connection ") - - try: - print ("Click Advanced Menu 3 Dot") - report.step_start("Click Advanced Menu 3 Dot") - ThreeDotMenuBtn = driver.find_element_by_xpath("//*[@content-desc='More options']") - ThreeDotMenuBtn.click() - except NoSuchElementException: - print("Exception: Click Advanced Menu Not Loaded") - - # Click Advanced - # //*[@text='Advanced'] - try: - print ("Click Advanced") - report.step_start("Click Advanced") - AdvBtn = driver.find_element_by_xpath("//*[@text='Advanced']") - AdvBtn.click() - except NoSuchElementException: - print("Exception: Click Advanced") - - #Scroll Down - scrollDown(setup_perfectoMobile) - - #Click HotSpot - #//*[@text="Hotspot 2.0"] - try: - print ("Click HotSpot") - report.step_start("Click HotSpot") - HotSpotBtn = driver.find_element_by_xpath("//*[@text='Hotspot 2.0']") - HotSpotBtn.click() - except NoSuchElementException: - print("Exception: Click HotSpot") - - #Click Ameriband - #//*[@text="Ameriband"] - try: - print ("Click Ameriband") - report.step_start("Click Ameriband") - AmeribandXpath = "//*[@text='Ameriband']" - AmeribandBtn = WebDriverWait(driver, 25).until(EC.presence_of_element_located((MobileBy.XPATH, AmeribandXpath))) - AmeribandBtn.click() - - except NoSuchElementException and TimeoutException and Exception: - report.step_start("Exception: Profile Don't Exist") - print("Exception: Profile Don't Exist") - - #Click Forget - #//*[@resource-id="com.android.settings:id/icon"] - try: - print ("Click Forget") - report.step_start("Click Forget") - ForgetBTN = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/icon']") - ForgetBTN.click() - except NoSuchElementException: - print("Exception: Click Forget") - - #Click Forget Confirm - #//*[@resource-id="android:id/button1"] - try: - print ("Click Forget Confirm") - report.step_start("Click Forget Confirm") - ForgetConfirm = driver.find_element_by_xpath("//*[@resource-id='android:id/button1']") - ForgetConfirm.click() - except NoSuchElementException: - print("Exception: Click Forget Confirm") - - else: - #Pixel Device - print ("Pixel Device Not supported: " + deviceModelName) - report.step_start("Pixel Device Not supported: ") - assert False - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - -def verify_APconnMobileDevice_Android(request, profileNameSSID, setup_perfectoMobile, connData): - print("\n-----------------------------") - print("Verify Connected Network ") - print("-----------------------------") - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - driver.switch_to.context('NATIVE_APP') - contexts = driver.contexts - - #Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - - if deviceModelName!=("Pixel 4"): - #Not a pixel Device - print ("Selected Device Model: " + deviceModelName) - - report.step_start("Click Connections") - try: - print("Click Connections") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - print("Clicking Wi-Fi") - report.step_start("Clicking Wi-Fi") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - - try: - print("Verify if Wifi is Connected to: " + profileNameSSID) - report.step_start("Verify if Wifi is Connected: " + profileNameSSID) - #WifiInternetErrMsg = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + profileNameSSID + "']") - WifiInternetErrMsg = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='Ameriband']") - print("Wifi Successfully Connected") - - except NoSuchElementException: - print("Wifi Connection Error: " + profileNameSSID) - report.step_start("Wifi Connection Error: " + profileNameSSID) - assert False - - else: - #Pixel Device - print ("Pixel Device Not supported: " + deviceModelName) - report.step_start("Pixel Device Not supported: ") - assert False - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - # Cache_clear Function - -def cache_clear_android(request, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Cache Clear") - print("-------------------------------------") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4" and "Galaxy S9"): - try: - print("Clicking Search button") - report.step_start("Click Search") - conn_ele = driver.find_element_by_xpath("//*[@content-desc='Search']") - conn_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Search") - - try: - driver.implicitly_wait(30) - print("Entering Chrome in Search") - report.step_start("Entering text Chrome") - search_ele = driver.find_element_by_xpath("//*[@resource-id='com.android.settings.intelligence:id/search_src_text']") - search_ele.send_keys("chrome") - except Exception as e: - print("Exception: Entering chrome failed") - print(e) - - try: - driver.implicitly_wait(40) - print("Clicking Chrome App Info") - report.step_start("Click Chrome App Info") - chrome_ele = driver.find_element_by_xpath("//*[@text='Chrome']") - chrome_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Chrome") - - # Scroll Down - scrollDown(setup_perfectoMobile) - - try: - driver.implicitly_wait(30) - print("Clicking Storage") - report.step_start("Click Storage") - store_ele = driver.find_element_by_xpath("//*[@text='Storage']") - store_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Storage") - - try: - driver.implicitly_wait(30) - print("Clicking Clear Cache") - report.step_start("Click Clear Cache") - clear_ele = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/button2']") - clear_ele.click() - print("Cleared Cache") - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Clearcache") - - try: - driver.implicitly_wait(30) - print("Checking if cache cleared or not with 0B") - report.step_start("Checking if cache cleared or not with 0B") - check_ele = driver.find_element_by_xpath("//*[@text='0 B']") - if check_ele is not None: - return True - else: - return False - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Checking cache clear") - - elif deviceModelName == ("Pixel 4"): - # Pixel cache clear code - try: - print("Clicking Search button") - report.step_start("Click Search") - conn_ele = driver.find_element_by_xpath("//*[@class='android.widget.ImageButton']") - conn_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Search") - - try: - driver.implicitly_wait(30) - print("Entering Chrome in Search") - report.step_start("Entering text Chrome") - search_ele = driver.find_element_by_xpath("//*[@resource-id='android:id/search_src_text']") - search_ele.send_keys("chrome") - except Exception as e: - print("Exception: Entering chrome failed") - print(e) - - try: - driver.implicitly_wait(35) - print("Clicking Chrome App Info") - report.step_start("Click Chrome App Info") - chrom_ele = driver.find_element_by_xpath("//*[@text='Chrome']") - chrom_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Chrome") - - try: - driver.implicitly_wait(30) - print("Clicking Storage & cache") - report.step_start("Click Storage & cache") - store_ele = driver.find_element_by_xpath("//*[@text='Storage & cache']") - store_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Storage & cache") - - try: - driver.implicitly_wait(30) - print("Clicking Clear Cache") - report.step_start("Click Clear Cache") - clear_ele = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/button2']") - clear_ele.click() - print("Cleared cache") - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Clearcache") - - try: - driver.implicitly_wait(30) - print("Checking if cache cleared or not with 0B") - report.step_start("Checking if cache cleared or not with 0B") - store_ele = driver.find_element_by_xpath("//*[@text='0 B']") - if store_ele is not None: - return True - else: - return False - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Checking cache clear") - - else: - try: - print("Clicking Search button") - report.step_start("Click Search") - conn_ele = driver.find_element_by_xpath("//*[@content-desc='Search settings']") - conn_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Search") - - try: - driver.implicitly_wait(30) - print("Entering Chrome in Search") - report.step_start("Entering text Chrome") - search_ele = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings.intelligence:id/search_src_text']") - search_ele.send_keys("chrome") - except Exception as e: - print("Exception: Entering chrome failed") - print(e) - - try: - driver.implicitly_wait(40) - print("Clicking Chrome App Info") - report.step_start("Click Chrome App Info") - chrome_ele = driver.find_element_by_xpath("//*[@text='Chrome']") - chrome_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Chrome") - - # Scroll Down - scrollDown(setup_perfectoMobile) - - try: - driver.implicitly_wait(30) - print("Clicking Storage") - report.step_start("Click Storage") - store_ele = driver.find_element_by_xpath("//*[@text='Storage']") - store_ele.click() - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Storage") - - try: - driver.implicitly_wait(30) - print("Clicking Clear Cache") - report.step_start("Click Clear Cache") - clear_ele = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/button2']") - clear_ele.click() - print("Cleared Cache") - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Clearcache") - - try: - driver.implicitly_wait(30) - print("Checking if cache cleared or not with 0B") - report.step_start("Checking if cache cleared or not with 0B") - check_ele = driver.find_element_by_xpath("//*[@text='0 B']") - if check_ele is not None: - return True - else: - return False - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Checking cache clear") - - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - -def check_if_no_internet_popup(driver):#To check and kill if any popups related to no internet - time.sleep(1) - driver.implicitly_wait(1) - try: - - popup = driver.find_element_by_xpath("//*[@resource-id='android:id/alertTitle']") - popup_text = popup.text - - try: - if popup_text == "Internet may not be available": - print("**alert** popup **alert**") - - try: - driver.implicitly_wait(2) - time.sleep(2) - kill_popup = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/keep_btn']") - kill_popup.click() - print("popup killed") - except: - print("Couldnt kill popup") - return False - else: - print("Popup Text is: ", popup_text) - print("popup element is: ",popup) - return False - except: - print("Popup Text is: ", popup_text) - print("popup element is: ", popup) - return False - except: - pass - -#To get an IP address -def get_ip_address_and(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@text='Wi-Fi']"))) - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, search_this="osVersion") != "12": - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - else: - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]") - try: #To forget exhisting ssid - print("To forget ssid in osversion 12") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - try: - print("To forget ssid in osversion 12-1206") - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/navigation_bar_item_icon_view']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - # time.sleep(2) - print("Selecting Wifi: " + WifiName) - #allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - #This is To get all available ssids - #------------------------------------------------------ - try: - for k in range(9): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName+" : Found in Device") - #allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - #allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - #------------------------------------------------------- - - - - #Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print(("Clicking WIFI")) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - - #Set password if Needed - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - time.sleep(3) - report.step_start("Set Wifi Password") - print("Set Wifi password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/edittext']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Click on connect button - # ------------------------------------------------------- - try: - time.sleep(5) - report.step_start("Click Connect Button") - print("Click Connect") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Verify if WiFi is connected - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, search_this="osVersion") != "12": - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected - 2") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - try: - report.step_start("Verifying wifi connection status connected/connected without internet") - check_if_no_internet_popup(driver) - check_if_no_internet_popup(driver) - - wifi_connection_name = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]" - ))) - if wifi_connection_name.text == WifiName: - wifi_connection_status = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary']" - ))) - if wifi_connection_status.text == "Connected": - ssid_with_internet = True - print("Connected with internet") - - else: - ssid_with_internet = False - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - # Go into additional details here - else: - # Connected to some other wifi, makes sense to close app and fail this testcase - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - #Get into Additional Details - #To Get an IP Address - #To Forget connection - #To turn off auto. connect - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - print("Unable to get IP address") - pass - - report.step_start("Forget SSID") - - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@text='Forget']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - #--------------------Pixel 4 code--------------------------- - else: - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set password if Needed - # ------------------------------------------------------- - try: - time.sleep(3) - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - print("Entering password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - report.step_start("Click Connect Button") - time.sleep(5) - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='"+ WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - #------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - try: - print("clicking on wifi switch") - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(2) - get_switch_element.click() - except: - print("couldn't click on wifi switch") - # allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - -#only to connect to wifi -def wifi_connect(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - #allure.attach(name= body=str("\n-------------------------------------")) - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - #allure.attach(name= body=str("\Selected Device Model: " + deviceModelName)) - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - - print("Searching for Wifi: " + WifiName) - #allure.attach(name= body=str("Searching for Wifi: " + WifiName)) - time.sleep(2) - print("Selecting Wifi: " + WifiName) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(9): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - - - #Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - #allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - #allure.attach(name= body=str("Exception on Selecting Wifi Network. Please check wifi Name or signal")) - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - - #Set password if Needed - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/edittext']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Click on connect button - # ------------------------------------------------------- - try: - report.step_start("Click Connect Button") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - # //*[@resource-id='com.android.settings:id/summary' and @text="Sign in to the network."]/parent::*/android.widget.TextView[@text='XWF-OWF_DSx'] - #Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - #allure.attach(name= body=str("Wifi Successfully Connected")) - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - #allure.attach(name= body=str("Wifi Successfully Connected without internet")) - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - #allure.attach(name=body=str("Wifi Successfully Connected")) - except: - try: - report.step_start("Unknown WIFI status found") - ssid_with_internet = False - print("Unknown WIFI status found") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - #allure.attach(name=body=str("Wifi Connection Error: " + WifiName)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - - except NoSuchElementException: - print("No Switch element found") - #allure.attach(name= body=str("No Switch element found")) - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - #allure.attach(name= body=str("Couldn't find wifi Button")) - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - #allure.attach(name= body=str("Exception: Verify Xpath - Update/check Xpath for Click Connections")) - # -----------------To Open Connections page--------------------------- - else: #--------------Pixel 4 code-------------------------- - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='android:id/icon']") - get_switch_text = get_switch_text_element.click() - if get_switch_text is not None: - switch_text = "Off" - else: - switch_text = "On" - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "On" - else: - switch_text = "Off" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - #allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - # Set password if Needed - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - report.step_start("Click Connect Button") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - - except NoSuchElementException: - print("No Switch element found") - # allure.attach(name= body=str("No Switch element found")) - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - # allure.attach(name= body=str("Couldn't find wifi Button")) - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # allure.attach(name= body=str("Exception: Verify Xpath - Update/check Xpath for Click Connections")) - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - -#To disconnect and forget network -def wifi_disconnect_and_forget(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("WIFI Disconnect") - print("-------------------------------------") - #allure.attach(name= body=str("------------------- WIFI Disconnect ------------------")) - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - #---------------------This is to Forget current connected SSID------------------------------- - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - #allure.attach(name=body=str("Forget old ssid")) - except: - print("Couldn't forget ssid") - #allure.attach(name=body=str("Couldn't forget ssid")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - except: - #allure.attach(name=body=str("Couldn't get into additional details")) - print("Couldn't get into additional details") - except: - #allure.attach(name=body=str("No Connected SSIDS")) - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - try: - print("clicking on wifi switch") - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(2) - get_switch_element.click() - except: - print("couldn't click on wifi switch") - - - except NoSuchElementException: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - else:#-----------------------Pixel4 code------------------------- - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='android:id/icon']") - get_switch_text = get_switch_text_element.click() - if get_switch_text is not None: - switch_text = "Off" - else: - switch_text = "On" - - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "On" - else: - switch_text = "Off" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - except: - #allure.attach(name=body=str("Couldn't get into additional details")) - print("Couldn't get into additional details") - except: - #allure.attach(name=body=str("No Connected SSIDS")) - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - try: - print("clicking on wifi switch") - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(2) - get_switch_element.click() - except: - print("couldn't click on wifi switch") - - - except NoSuchElementException: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - - -# try: -# elements = driver.find_elements_by_xpath("//*[@resource-id='com.android.settings:id/title']") -# print("elements: ", elements) -# print(len(elements)) -# for i in range(len(elements)): -# print("elements[i]", elements[i]) -# print("elements[i].text", elements[i].text) -# except: -# print("No SSIDS available") -def get_all_available_ssids(driver, deviceModelName): - active_ssid_list = [] - print("Selected Device Model: " + deviceModelName) - if deviceModelName != ("Pixel 4"): - try: - time.sleep(8) - driver.implicitly_wait(10) - elements = driver.find_elements_by_xpath("//*[@resource-id='com.android.settings:id/title']") - # print("elements: ", elements) - print(len(elements)) - for i in range(len(elements)): - # print("elements[i]", elements[i]) - # print("elements[i].text", elements[i].text) - active_ssid_list.append(elements[i].text) - except: - print("No SSIDS available") - else: - try: - time.sleep(8) - driver.implicitly_wait(10) - elements = driver.find_elements_by_xpath("//*[@resource-id='android:id/title']") - # print("elements: ", elements) - print(len(elements)) - for i in range(len(elements)): - # print("elements[i]", elements[i]) - # print("elements[i].text", elements[i].text) - try: - active_ssid_list.append(elements[i].text) - except: - print("Encountered a cache SSID which is no longer in the DOM.Moving to next SSID.") - except: - print("No SSIDS available") - return active_ssid_list - -def reportClient(value): - global reporting_client # declare a to be a global - reporting_client = value # this sets the global value of a - -# This is a functon to get all of the ssid details -# This function needs to be called from a standalone script and not throuh testcase -# def get_all_available_ssids(): -# from appium import webdriver -# driver = None -# reporting_client = None -# -# warnings.simplefilter("ignore", ResourceWarning) -# urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -# -# capabilities = { -# 'platformName': 'Android', -# 'model': 'Galaxy S9', -# 'browserName': 'mobileOS', -# # 'automationName' : 'Appium', -# 'securityToken': 'eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MjE4NjgyOTksImp0aSI6IjIzNGFiOTM1LWIxYjQtNGZiOC1hZmJiLTM0OTQwNzU5MjIwMyIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiN2I1MzBhZTAtODgxOC00N2I5LTgzZjMtN2ZhMGZiMGRkYjRlIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI1MzI2NDQxNS0xYTQwLTQ1ZTctOGVkMi1hOTNiYWZmZWNjYjIiLCJzZXNzaW9uX3N0YXRlIjoiY2YzY2JlOGMtY2Y5OC00NzRlLWJmODctYTIxNzU0NzVhM2EzIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.4a4v6AKxmY95Zb-l84K_Od49WPikwOHP7ryctfmnn-w', -# 'useAppiumForWeb': 'false', -# 'useAppiumForHybrid': 'false', -# # 'bundleId' : request.config.getini("appPackage-android"), -# } -# -# app_data = { -# "webURL": "https://www.google.com", -# "lblSearch": "//*[@class='gLFyf']", -# "elelSearch": "(//*[@class='sbic sb43'])[1]", -# "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", -# "bundleId-iOS-Settings": 'com.apple.Preferences', -# "bundleId-iOS-Safari": 'com.apple.mobilesafari', -# "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", -# "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", -# # Android -# "platformName-android": 'Android', -# "appPackage-android": 'com.android.settings' -# } -# -# driver = webdriver.Remote( -# "https://tip.perfectomobile.com/nexperience/perfectomobile/wd/hub", -# capabilities -# ) -# -# try: -# print(driver) -# driver.implicitly_wait(35) -# #Driver Ends here -# -# projectname = "TIP-PyTest-Execution" -# projectversion = 1.0 -# jobname = "tip-sushant-android" -# jobnumber = 2 -# tags = "TestTag" -# testCaseName = "getting_ssids" -# -# # print("\nSetting Perfecto ReportClient....") -# perfecto_execution_context = PerfectoExecutionContext(driver, tags, Job(jobname, jobnumber), -# Project(projectname, projectversion)) -# reporting_client = PerfectoReportiumClient(perfecto_execution_context) -# reporting_client.test_start(testCaseName, TestContext([], "Perforce")) -# reportClient(reporting_client) -# -# -# setup_perfectoMobile = (driver, reporting_client) -# print("setup_perfectoMobile_android: ", setup_perfectoMobile) -# print(type(setup_perfectoMobile)) -# -# print("\n-------------------------------------") -# print("Select Wifi/AccessPoint Connection") -# print("-------------------------------------") -# print("Verifying Wifi Connection Details....") -# report = setup_perfectoMobile[1] -# driver = setup_perfectoMobile[0] -# -# -# -# ip_address_element_text = False -# ssid_with_internet = False -# ssid_list = [] -# -# report.step_start("Switching Driver Context") -# print("Switching Context to Native") -# contexts = driver.contexts -# print("contexts", contexts) -# driver.switch_to.context(contexts[0]) -# print("1508") -# -# # Open Settings Application -# openApp(app_data["appPackage-android"], setup_perfectoMobile) -# -# deviceModelName = driver.execute_script('mobile:handset:info', {'property': 'model'}) -# -# # deviceModelName = getDeviceModelName(setup_perfectoMobile) -# print("Selected Device Model: " + deviceModelName) -# -# if deviceModelName != ("Pixel 4"): -# # -----------------To Open Connections page----------------------- -# try: -# print("Verifying Connected Wifi Connection") -# report.step_start("Click Connections") -# connElement = driver.find_element_by_xpath("//*[@text='Connections']") -# connElement.click() -# -# # ---------------------Open WIFI page------------------------------- -# try: -# report.step_start("Clicking Wi-Fi") -# print("Clicking WIFI") -# wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") -# wifiElement.click() -# -# # --------------------To Turn on WIFi Switch if already OFF-------------------------------- -# try: -# driver.implicitly_wait(1) -# get_switch_text_element = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/switch_text']") -# get_switch_text = get_switch_text_element.text -# print("get_switch_text: ", get_switch_text) -# # print("Find wifi switch") -# try: # To Turn on Wi-Fi Switch -# if get_switch_text == "Off": -# # driver.implicitly_wait(3) -# get_switch_element = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/switch_widget']") -# # driver.implicitly_wait(1) -# get_switch_element.click() -# driver.implicitly_wait(1) -# i = 0 -# for i in range(5): -# if get_switch_text == "On": -# print("WIFI Switch is ON") -# break -# else: -# try: -# get_switch_text_element = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/switch_text']") -# get_switch_text = get_switch_text_element.text -# except: -# pass -# print("Sleeping for: ", i) -# time.sleep(i) -# pass -# if get_switch_text == "Off": -# print("Switch is Still OFF") -# closeApp(app_data["appPackage-android"], setup_perfectoMobile) -# close_driver(driver) -# return ip_address_element_text -# else: -# print("Switch is already On") -# check_if_no_internet_popup(driver) -# except: -# print("Couldn't turn on WIFI sewitch") -# closeApp(app_data["appPackage-android"], setup_perfectoMobile) -# close_driver(driver) -# return ip_address_element_text -# -# # ---------------------This is to Forget current connected SSID------------------------------- -# try: # To deal with already connected SSID -# check_if_no_internet_popup(driver) -# network_category = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/connected_network_category']") -# try: # To forget exhisting ssid -# print("To forget exhisting ssid") -# check_if_no_internet_popup(driver) -# additional_details_element = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/layout_details']") -# additional_details_element.click() -# try: -# check_if_no_internet_popup(driver) -# forget_ssid = driver.find_element_by_xpath( -# "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") -# forget_ssid.click() -# print("Forget old ssid") -# except: -# print("Couldn't forget ssid") -# closeApp(app_data["appPackage-android"], setup_perfectoMobile) -# close_driver(driver) -# return ip_address_element_text -# except: -# print("Couldn't get into additional details") -# except: -# print("No Connected SSIDS") -# # ----------------------This is to Forget current connected SSID-------------------------------- -# scroll_if_not_end_of_page = True -# -# try: -# for i in range(10): -# try: -# driver.implicitly_wait(5) -# window_size = driver.get_window_size() -# # print(window_size) -# # print(type(window_size)) -# window_width = window_size['width'] -# # print(window_width) -# window_height = window_size['height'] -# # print(window_height) -# try: -# try: -# elements = driver.find_elements_by_xpath( -# "//*[@resource-id='com.android.settings:id/title']") -# print("elements: ", elements) -# print(len(elements)) -# curent_ssid_list = [] -# for j in range(len(elements)): -# # print("elements[i].text", elements[j].text) -# # print(j) -# if i != 0: -# curent_ssid_list.append(elements[j].text) -# # print("curent_ssid_list: ", curent_ssid_list) -# ssid_list.append(elements[j].text) -# print("ssid_list",ssid_list) -# print("curent_ssid_list: ", curent_ssid_list) -# except: -# print("No SSIDS available") -# -# try: -# print("in check") -# check = all(item in curent_ssid_list for item in ssid_list) -# print("check: ", check) -# if check: -# scroll_if_not_end_of_page = False -# break -# else: -# new_window_height = window_height + 100 -# # driver.scroll(0, new_window_height) -# driver.execute_script("mobile: scroll", {"direction": "down"}) -# continue -# except: -# print("Error in page end") -# except: -# pass -# except: -# pass -# except: -# pass -# except NoSuchElementException: -# print("No Switch element found") -# # ---------------------To Turn on WIFi Switch if already OFF------------------------------- -# -# except NoSuchElementException: -# print("Couldn't find wifi Button") -# # ------------------Open WIFI page---------------------------------- -# -# except NoSuchElementException: -# print("Exception: Verify Xpath - Update/check Xpath for Click Connections") -# # -----------------To Open Connections page--------------------------- -# -# except: -# try: -# closeApp(app_data["appPackage-android"], setup_perfectoMobile) -# except: -# pass -# try: -# reporting_client.test_stop(TestResultFactory.create_success()) -# print('Report-Url: ' + reporting_client.report_url() + '\n') -# except: -# pass -# try: -# close_driver(driver) -# except: -# pass -# finally: -# try: -# reporting_client.test_stop(TestResultFactory.create_success()) -# print('Report-Url: ' + reporting_client.report_url() + '\n') -# except: -# pass -# try: -# close_driver(driver) -# except: -# pass -# return ssid_list - #------------Enterprise Mode code---------------------------- -def get_ip_address_eap_and(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@text='Wi-Fi']"))) - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, search_this="osVersion") != "12": - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - else: - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]") - try: #To forget exhisting ssid - print("To forget ssid in osversion 12") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - try: - print("To forget ssid in os version 12") - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/navigation_bar_item_icon_view']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - #allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - #This is To get all available ssids - #------------------------------------------------------ - try: - for k in range(10): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName+" : Found in Device") - #allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - #allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - #------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print("Selecting Wifi") - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set username - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifiUserElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='com.android.settings:id/edittext' and @password='false']"))) - wifiUserElement.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - - # Set Password - # ------------------------------------------------------- - try: - # driver.implicitly_wait(6) - report.step_start("Set Password") - print("Set Password") - wifiPasswordElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Enter password']"))) - wifiPasswordElement.send_keys(ttls_passwd) - print("Entered Password") - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - print("Selecting CA Cert") - certElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Select certificate']"))) - certElement.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - print("Validting CA Cert") - certElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text=\"Don't validate\"]"))) - certElement.click() - except NoSuchElementException: - print("validation failed") - # ------------------------------------------------------- - if (deviceModelName == "Galaxy S9"): - driver.hide_keyboard() - print("Hide keyboard") - # Click on connect button - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Click Connect Button") - print("Click Connect Button") - joinBTNElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Connect']"))) - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - pass - - report.step_start("Forget SSID") - - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@text='Forget']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - else: #--------------------Pixel code----------------------------------- - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection in Pixel") - report.step_start("Click Network & internet in pixel4") - conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") - conn_element.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifi_element = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifi_element.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifi_selection_element = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifi_selection_element.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - print("Selecting certificate") - cert_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/ca_cert']") - cert_element.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - print("validation") - cert_element = driver.find_element_by_xpath( - "//*[@text='Do not validate']") - cert_element.click() - except NoSuchElementException: - print("validation failed") - # Set username - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifi_user_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/identity']") - wifi_user_element.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - # Scroll Down - scroll_down_pixel(setup_perfectoMobile) - time.sleep(2) - # Set Password - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - print("Entering password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(ttls_passwd) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Click Connect Button") - print("Click Connect Button") - join_element = driver.find_element_by_xpath("//*[@text='Connect']") - join_element.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='"+ WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - #------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - forget_ssid.click() - print("Forgetting ssid") - #------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't forget ssid") - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet -#only to connect to wifi -def wifi_connect_eap(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - #allure.attach(name= body=str("\n-------------------------------------")) - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - #allure.attach(name= body=str("\Selected Device Model: " + deviceModelName)) - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - wifiElement = driver.find_element_by_xpath("//*[@text='Wi-Fi']") - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - - print("Searching for Wifi: " + WifiName) - #allure.attach(name= body=str("Searching for Wifi: " + WifiName)) - time.sleep(2) - print("Selecting Wifi: " + WifiName) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for check_for_all_ssids in range(2): - available_ssids = get_all_available_ssids(driver, deviceModelName) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - #allure.attach(name= body=str(WifiName + " : Found in Device")) - break - except: - print("1538") - pass - if not ssid_found: - print("could not found" + WifiName + " in device") - #allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print("Selecting Wifi") - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - # Set username - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifiUserElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/edittext' and @password='false']") - wifiUserElement.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - - # Set Password - # ------------------------------------------------------- - try: - driver.implicitly_wait(6) - report.step_start("Set Password") - print("Set Password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@text='Enter password']") - wifiPasswordElement.send_keys(ttls_passwd) - print("Entered Password") - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - certElement = driver.find_element_by_xpath( - "//*[@text='Select certificate']") - certElement.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - certElement = driver.find_element_by_xpath( - "//*[@text=\"Don't validate\"]") - certElement.click() - except NoSuchElementException: - print("validation failed") - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Click Connect Button") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - #allure.attach(name= body=str("Wifi Successfully Connected")) - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - #allure.attach(name= body=str("Wifi Successfully Connected without internet")) - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - #allure.attach(name=body=str("Wifi Successfully Connected")) - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - #allure.attach(name=body=str("Wifi Connection Error: " + WifiName)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - - except NoSuchElementException: - print("No Switch element found") - #allure.attach(name= body=str("No Switch element found")) - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - #allure.attach(name= body=str("Couldn't find wifi Button")) - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - #allure.attach(name= body=str("Exception: Verify Xpath - Update/check Xpath for Click Connections")) - # -----------------To Open Connections page--------------------------- - else: #--------------Pixel 4 code-------------------------- - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") - conn_element.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifi_element = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifi_element.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifi_selection_element = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifi_selection_element.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - cert_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/ca_cert']") - cert_element.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - cert_element = driver.find_element_by_xpath( - "//*[@text='Do not validate']") - cert_element.click() - except NoSuchElementException: - print("validation failed") - # Set username - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifi_user_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/identity']") - wifi_user_element.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - # Scroll Down - scroll_down_pixel(setup_perfectoMobile) - time.sleep(2) - # Set Password - # ------------------------------------------------------- - try: - driver.implicitly_wait(6) - report.step_start("Set Password") - print("Set Password") - wifi_password_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/password']") - wifi_password_element.send_keys(ttls_passwd) - print("Entered Password") - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Click Connect Button") - join_element = driver.find_element_by_xpath("//*[@text='Connect']") - join_element.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet - - - except NoSuchElementException: - print("No Switch element found") - # allure.attach(name= body=str("No Switch element found")) - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except NoSuchElementException: - print("Couldn't find wifi Button") - # allure.attach(name= body=str("Couldn't find wifi Button")) - # ------------------Open WIFI page---------------------------------- - - except NoSuchElementException: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # allure.attach(name= body=str("Exception: Verify Xpath - Update/check Xpath for Click Connections")) - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ssid_with_internet -#--------------------CAPTIVE PORTAL Android----------------------------------------- -def captive_portal_and(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - #allure.attach(name= body=str("\n-------------------------------------")) - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - #allure.attach(name= body=str("\Selected Device Model: " + deviceModelName)) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi-Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ", get_switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: # To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - else: - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]") - try: # To forget exhisting ssid - print("To forget ssid in osversion 12") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - try: - print("To forget ssid in osversion 12-1206") - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/navigation_bar_item_icon_view']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - # time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(9): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print(("Clicking WIFI")) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set password if Needed - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - time.sleep(3) - report.step_start("Set Wifi Password") - print("Set Wifi password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/edittext']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - time.sleep(5) - report.step_start("Click Connect Button") - print("Click Connect") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - #---------------------Clicking on ssid for captive portal login-------- - try: - time.sleep(2) - report.step_start("Selecting Wifi: " + WifiName) - wifi_selection_element = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifi_selection_element.click() - except NoSuchElementException: - print("Not connected to Captive portal Ssid.. ") - try: - time.sleep(2) - report.step_start("Click Accept Terms Button") - print("Click Accept Terms Button") - join_btn_element = driver.find_element_by_xpath("//*[@text='Accept Terms of Service']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't press Accept terms button") - try: - time.sleep(2) - report.step_start("Click Continue Button") - print("Click Continue Button") - join_btn_element = driver.find_element_by_xpath("//*[@text='Continue']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't press Continue button") - try: - time.sleep(2) - report.step_start("Click Last Terms if needed") - print("Click Last Terms if needed") - join_btn_element = driver.find_element_by_xpath("//*[@text='Done']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't find the last terms page") - - - # Verify if WiFi is connected - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected - 2") - WifiInternetErrMsg = WebDriverWait(driver, 60).until( - EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - try: - report.step_start( - "Verifying wifi connection status connected/connected without internet") - check_if_no_internet_popup(driver) - check_if_no_internet_popup(driver) - - wifi_connection_name = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]" - ))) - if wifi_connection_name.text == WifiName: - wifi_connection_status = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary']" - ))) - if wifi_connection_status.text == "Connected": - ssid_with_internet = True - print("Connected with internet") - - else: - ssid_with_internet = False - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - # Go into additional details here - else: - # Connected to some other wifi, makes sense to close app and fail this testcase - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find( - "//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located( - (MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - print("Unable to get IP address") - pass - - report.step_start("Forget SSID") - - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@text='Forget']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - # --------------------Pixel 4 code--------------------------- - else: - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set password if Needed - # ------------------------------------------------------- - try: - time.sleep(3) - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - print("Entering password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - report.step_start("Click Connect Button") - time.sleep(5) - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - try: - time.sleep(20) - report.step_start("Click Accept Terms Button") - print("Click Accept Terms Button") - join_btn_element = driver.find_element_by_xpath("//*[@text='Accept Terms of Service']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't press Accept terms button") - try: - time.sleep(2) - report.step_start("Click Continue Button") - print("Click Continue Button") - join_btn_element = driver.find_element_by_xpath("//*[@text='Continue']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't press Continue button") - try: - time.sleep(2) - report.step_start("Click Last Terms if needed") - print("Click Last Terms if needed") - join_btn_element = driver.find_element_by_xpath("//*[@text='Done']") - join_btn_element.click() - except NoSuchElementException: - print(" Couldn't find the last terms page") - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until( - EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - # print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - # print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - try: - print("clicking on wifi switch") - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(2) - get_switch_element.click() - except: - print("couldn't click on wifi switch") - # allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - -def close_driver(driver): - driver.close() - driver.quit() - - -def expressWifi(request, WifiName, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Express Wifi Verification") - print("-------------------------------------") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - try: - click_on_ssid = WebDriverWait(driver, 10).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Sign in to the network.']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - click_on_ssid.click() - print("click on expresswifi SSID to open login page") - except: - print("Could not found expresswifi SSID") - - try: - print("Express Wifi Home Page Verification") - report.step_start("Express Wifi Home Page Verification") - driver.implicitly_wait(2) - ExpressWifiBytesLeft = driver.find_element_by_xpath("//*[@label='0KB left']") - except NoSuchElementException: - # driver.implicitly_wait(25) - #Add function to Toggle Wifi if Express Wifi Home Page not Triggerd - print("Express Wifi Page Not Logged In - ") - - try: - print("ExpressWifi Click on Menu Circle") - report.step_start("ExpressWifi Click on Menu Circle") - ExpressWifiMenu = driver.find_element_by_xpath("//*[@resource-id='dogfood-menu']") - ExpressWifiMenu.click() - except NoSuchElementException: - print("---- Exception ExpressWifi Click on Menu Circle") - - try: - print("ExpressWifi Click Run Tests!") - report.step_start("ExpressWifi Click Run Tests!") - ExpressWifiRunTests = driver.find_element_by_xpath("//*[@resource-id='run_tests']") - ExpressWifiRunTests.click() - time.sleep(20) - except NoSuchElementException: - print("Exception ExceptionExpressWifi Click Run Tests!") - - try: - print("Verify Results: ") - report.step_start("Verify Results") - - expressWifiOutputMsg = "//*[@resource-id='test_result']" - LogOut = driver.find_element_by_xpath(expressWifiOutputMsg) - print("----" + LogOut.text + "\n") - if 'test completed successfully' in LogOut.text: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return True - else: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return False - except NoSuchElementException: - print("Exception Verify Results") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - -def scroll_down_pixel(setup_perfectoMobile): - print("Scroll Down") - setup_perfectoMobile[1].step_start("Scroll Down") - params2 = {} - params2["start"] = "50%,50%" - params2["end"] = "50%,20%" - params2["duration"] = "4" - time.sleep(2) - setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) - time.sleep(1) -def scroll_up(setup_perfectoMobile): - print("Scroll up") - setup_perfectoMobile[1].step_start("Scroll up") - params2 = {} - params2["start"] = "50%,20%" - params2["end"] = "50%,80%" - params2["duration"] = "2" - time.sleep(1) - setup_perfectoMobile[0].execute_script('mobile:touch:swipe', params2) - time.sleep(1) - - -def gets_ip_add_and_does_not_forget_ssid(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@text='Wi-Fi']"))) - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - # time.sleep(2) - print("Selecting Wifi: " + WifiName) - #allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - #This is To get all available ssids - #------------------------------------------------------ - try: - for k in range(9): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName+" : Found in Device") - #allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - #allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - #------------------------------------------------------- - - - - #Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print(("Clicking WIFI")) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - - #Set password if Needed - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - time.sleep(3) - report.step_start("Set Wifi Password") - print("Set Wifi password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/edittext']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - #Click on connect button - # ------------------------------------------------------- - try: - time.sleep(5) - report.step_start("Click Connect Button") - print("Click Connect") - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected - 2") - WifiInternetErrMsg = WebDriverWait(driver, 60).until( - EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - try: - report.step_start("Verifying wifi connection status connected/connected without internet") - check_if_no_internet_popup(driver) - check_if_no_internet_popup(driver) - - wifi_connection_name = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]" - ))) - if wifi_connection_name.text == WifiName: - wifi_connection_status = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary']" - ))) - if wifi_connection_status.text == "Connected": - ssid_with_internet = True - print("Connected with internet") - - else: - ssid_with_internet = False - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - # Go into additional details here - else: - # Connected to some other wifi, makes sense to close app and fail this testcase - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - print("Unable to get IP address") - pass - - # report.step_start("Forget SSID") - # - # try: - # check_if_no_internet_popup(driver) - # forget_ssid = driver.find_element_by_xpath( - # "//*[@text='Forget']") - # forget_ssid.click() - # print("Forgetting ssid") - # - # # ------------------------------- Wifi Switch ---------------- - # # try: - # # print("clicking on wifi switch") - # # get_switch_element = driver.find_element_by_xpath( - # # "//*[@resource-id='com.android.settings:id/switch_widget']") - # # driver.implicitly_wait(2) - # # get_switch_element.click() - # # except: - # # print("couldn't click on wifi switch") - # # #allure.attach(name= body=str("couldn't click on wifi switch")) - # except: - # print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - #--------------------Pixel 4 code--------------------------- - else: - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set password if Needed - # ------------------------------------------------------- - try: - time.sleep(3) - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - print("Entering password") - wifiPasswordElement = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(WifiPass) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - report.step_start("Click Connect Button") - time.sleep(5) - joinBTNElement = driver.find_element_by_xpath("//*[@text='Connect']") - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet -#----------------------------------Gets ip address of the enterprise ssid and does not forget it------------------ -def gets_ip_add_eap_and_does_not_forget_ssid(request, WifiName, User, ttls_passwd, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@text='Wi-Fi']"))) - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - #---------------------This is to Forget current connected SSID------------------------------- - try: #To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/connected_network_category']") - try: #To forget exhisting ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into additional details") - except: - print("No Connected SSIDS") - #----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - #allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - #This is To get all available ssids - #------------------------------------------------------ - try: - for k in range(10): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName+" : Found in Device") - #allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - print("could not found " + WifiName + " in device") - #allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - #------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - print("Selecting Wifi") - wifiSelectionElement = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifiSelectionElement.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Set username - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifiUserElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='com.android.settings:id/edittext' and @password='false']"))) - wifiUserElement.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - - # Set Password - # ------------------------------------------------------- - try: - # driver.implicitly_wait(6) - report.step_start("Set Password") - print("Set Password") - wifiPasswordElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Enter password']"))) - wifiPasswordElement.send_keys(ttls_passwd) - print("Entered Password") - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - print("Selecting CA Cert") - certElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Select certificate']"))) - certElement.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - print("Validting CA Cert") - certElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text=\"Don't validate\"]"))) - certElement.click() - except NoSuchElementException: - print("validation failed") - # ------------------------------------------------------- - if (deviceModelName == "Galaxy S9"): - driver.hide_keyboard() - print("Hide keyboard") - # Click on connect button - # ------------------------------------------------------- - try: - # driver.implicitly_wait(3) - report.step_start("Click Connect Button") - print("Click Connect Button") - joinBTNElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Connect']"))) - joinBTNElement.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected - 2") - WifiInternetErrMsg = WebDriverWait(driver, 60).until( - EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - try: - report.step_start("Verifying wifi connection status connected/connected without internet") - check_if_no_internet_popup(driver) - check_if_no_internet_popup(driver) - - wifi_connection_name = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]" - ))) - if wifi_connection_name.text == WifiName: - wifi_connection_status = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary']" - ))) - if wifi_connection_status.text == "Connected": - ssid_with_internet = True - print("Connected with internet") - - else: - ssid_with_internet = False - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - # Go into additional details here - else: - # Connected to some other wifi, makes sense to close app and fail this testcase - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - print("Unable to get IP address") - pass - - # report.step_start("Forget SSID") - # - # try: - # check_if_no_internet_popup(driver) - # forget_ssid = driver.find_element_by_xpath( - # "//*[@text='Forget']") - # forget_ssid.click() - # print("Forgetting ssid") - # - # # ------------------------------- Wifi Switch ---------------- - # # try: - # # print("clicking on wifi switch") - # # get_switch_element = driver.find_element_by_xpath( - # # "//*[@resource-id='com.android.settings:id/switch_widget']") - # # driver.implicitly_wait(2) - # # get_switch_element.click() - # # except: - # # print("couldn't click on wifi switch") - # # #allure.attach(name= body=str("couldn't click on wifi switch")) - # except: - # print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - else: #--------------------Pixel code----------------------------------- - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection in Pixel") - report.step_start("Click Network & internet in pixel4") - conn_element = driver.find_element_by_xpath("//*[@text='Network & internet']") - conn_element.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifi_element = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifi_element.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - # ---------------------This is to Forget current connected SSID------------------------------- - try: # To deal with already connected SSID - check_if_no_internet_popup(driver) - network_category = driver.find_element_by_xpath("//*[@text='Connected']") - try: # To forget existing ssid - print("To forget ssid") - check_if_no_internet_popup(driver) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - except: - print("Couldn't get into additional details") - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/button1']") - forget_ssid.click() - print("Forget old ssid") - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("No Connected SSIDS") - # ----------------------This is to Forget current connected SSID-------------------------------- - - time.sleep(2) - print("Selecting Wifi: " + WifiName) - # allure.attach(name= body=str("Selecting Wifi: " + WifiName)) - ssid_found = False - available_ssids = False - # This is To get all available ssids - # ------------------------------------------------------ - try: - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scrollDown(setup_perfectoMobile) - time.sleep(2) - else: - ssid_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_found: - ssid_not_found = False - for k in range(5): - available_ssids = get_all_available_ssids(driver, deviceModelName) - print("active_ssid_list: ", available_ssids) - allure.attach(name="Available SSIDs in device: ", body=str(available_ssids)) - try: - if WifiName not in available_ssids: - scroll_up(setup_perfectoMobile) - time.sleep(2) - else: - ssid_not_found = True - print(WifiName + " : Found in Device") - # allure.attach(name= body=str(WifiName+" : Found in Device")) - break - except: - print("couldn't find wifi in available ssid") - if not ssid_not_found: - print("could not found " + WifiName + " in device") - # allure.attach(name= body=str("could not found" + WifiName + " in device")) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # ------------------------------------------------------- - - # Selecting WIFI - # ------------------------------------------------------- - try: - report.step_start("Selecting Wifi: " + WifiName) - wifi_selection_element = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='" + WifiName + "']"))) - wifi_selection_element.click() - check_if_no_internet_popup(driver) - except Exception as e: - print("Exception on Selecting Wifi Network. Please check wifi Name or signal") - request.config.cache.set(key="SelectingWifiFailed", value=str(e)) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # ------------------------------------------------------- - # Selecting certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Selecting CA Cert") - print("Selecting certificate") - cert_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/ca_cert']") - cert_element.click() - except NoSuchElementException: - print("Selecting certificate failed") - # ------------------------------------------------------- - # Validating certificate - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Validting CA Cert") - print("validation") - cert_element = driver.find_element_by_xpath( - "//*[@text='Do not validate']") - cert_element.click() - except NoSuchElementException: - print("validation failed") - # Set username - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Set User name") - print("Set User name") - wifi_user_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/identity']") - wifi_user_element.send_keys(User) - except NoSuchElementException: - print("User name not Loaded") - # ------------------------------------------------------- - # Scroll Down - scroll_down_pixel(setup_perfectoMobile) - time.sleep(2) - # Set Password - # ------------------------------------------------------- - try: - check_if_no_internet_popup(driver) - report.step_start("Set Wifi Password") - print("Entering password") - wifiPasswordElement = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/password']") - wifiPasswordElement.send_keys(ttls_passwd) - except NoSuchElementException: - print("Password Page Not Loaded, password May be cached in the System") - check_if_no_internet_popup(driver) - - # ------------------------------------------------------- - - # Click on connect button - # ------------------------------------------------------- - try: - driver.implicitly_wait(3) - report.step_start("Click Connect Button") - join_element = driver.find_element_by_xpath("//*[@text='Connect']") - join_element.click() - except NoSuchElementException: - print("Connect Button Not Enabled...Verify if Password is set properly ") - check_if_no_internet_popup(driver) - # ------------------------------------------------------- - - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - print("Not able to verify the connected WiFi. Scrolling up.") - scroll_up(setup_perfectoMobile) - scroll_up(setup_perfectoMobile) - # check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - print("Verifying after scrolling") - scroll_up(setup_perfectoMobile) - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - - -#-----------------------------ip address check------------------------------------------------ -def gets_ip_add_for_checking_and_forgets_ssid(request, WifiName, WifiPass, setup_perfectoMobile, connData): - print("\n-------------------------------------") - print("Select Wifi/AccessPoint Connection") - print("-------------------------------------") - print("Verifying Wifi Connection Details....") - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - ip_address_element_text = False - ssid_with_internet = False - - report.step_start("Switching Driver Context") - print("Switching Context to Native") - contexts = driver.contexts - driver.switch_to.context(contexts[0]) - - # Open Settings Application - openApp(connData["appPackage-android"], setup_perfectoMobile) - deviceModelName = getDeviceModelName(setup_perfectoMobile) - print("Selected Device Model: " + deviceModelName) - - if deviceModelName != ("Pixel 4"): - report.step_start("Set Wifi Network to " + WifiName) - - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Connections") - connElement = driver.find_element_by_xpath("//*[@text='Connections']") - connElement.click() - - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH,"//*[@text='Wi-Fi']"))) - wifiElement.click() - - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - print("get_switch_text: ",get_switch_text) - print("Find wifi switch") - try: #To Turn on Wi-Fi Switch - if get_switch_text == "Off": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if get_switch_text == "On": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_text']") - get_switch_text = get_switch_text_element.text - except: - pass - print("Sleeping for: ", i) - time.sleep(i) - pass - if get_switch_text == "Off": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - # Verify if WiFi is connected - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='" - + WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected - 2") - WifiInternetErrMsg = WebDriverWait(driver, 60).until( - EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - try: - report.step_start( - "Verifying wifi connection status connected/connected without internet") - check_if_no_internet_popup(driver) - check_if_no_internet_popup(driver) - - wifi_connection_name = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/connected_list']/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView[1]" - ))) - if wifi_connection_name.text == WifiName: - wifi_connection_status = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary']" - ))) - if wifi_connection_status.text == "Connected": - ssid_with_internet = True - print("Connected with internet") - - else: - ssid_with_internet = False - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - # Go into additional details here - else: - # Connected to some other wifi, makes sense to close app and fail this testcase - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - if get_phone_information(setup_perfectoMobile=setup_perfectoMobile, - search_this="osVersion") != "12": - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/layout_details']") - additional_details_element.click() - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - # allure.attach(name= body=str("IP address element not found")) - # --------------------Added for ssid security check-------------------------- - try: - time.sleep(2) - security_name_element = driver.find_element_by_xpath( - "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']") - security_name_element_text = security_name_element.text - print("Ssid security is :", security_name_element_text) - allure.attach(name="Ssid Security:", body=str(security_name_element_text)) - except: - print("Security is not available") - # --------------------Added for ssid Name check-------------------------- - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - assert False - try: - check_if_no_internet_popup(driver) - driver.implicitly_wait(3) - time.sleep(2) - auto_reconnect_off = driver.find("//*[@resource-id='android:id/switch_widget']") - auto_reconnect_off_text = auto_reconnect_off.text - if auto_reconnect_off_text != "Off": - auto_reconnect_off.click() - print("Auto reconnect turning off") - else: - print("Auto reconnect is already off") - except: - print("Couldn't find auto reconnect element") - - # ------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/forget_button']//*[@resource-id='com.android.settings:id/icon']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - else: - try: - print("Into additional details") - time.sleep(2) - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/wifi_details']") - additional_details_element.click() - - try: - print("click on view more") - additional_details_element = WebDriverWait(driver, 50).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='View more']"))) - additional_details_element.click() - except: - pass - - try: - time.sleep(2) - ssid_name_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/entity_header_title']") - ssid_name_element_text = ssid_name_element.text - print("Ssid Name is :", ssid_name_element_text) - allure.attach(name="Ssid connected:", body=str(ssid_name_element_text)) - except: - print("Ssid name not available") - pass - - if (ssid_name_element_text == WifiName): - print("Wifi is connected to the expected ssid") - ip_address_element_text = "SSID Match, S20 Does Not support scrolling" - ssid_with_internet = "SSID Match, S20 Does Not support scrolling" - # return ip_address_element_text, ssid_with_internet - else: - print("Wifi is not connected to the expected ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 1") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 2") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - - report.step_start("Scrolling for ip address - 3") - # if deviceModelName == "Galaxy S20": - # print("Scrolling for S20") - driver.swipe(470, 1400, 470, 1000, 400) - # else: - # scrollDown(setup_perfectoMobile) - report.step_start("looking for ip address") - - try: - ip_address_element_text = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.TextView[2]") - ip_address_element_text = ip_address_element_text.text - ssid_with_internet = True - except: - print("Unable to get IP address") - pass - - report.step_start("Forget SSID") - - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@text='Forget']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - # try: - # print("clicking on wifi switch") - # get_switch_element = driver.find_element_by_xpath( - # "//*[@resource-id='com.android.settings:id/switch_widget']") - # driver.implicitly_wait(2) - # get_switch_element.click() - # except: - # print("couldn't click on wifi switch") - # #allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - #--------------------Pixel 4 code--------------------------- - else: - report.step_start("Set Wifi Network to " + WifiName) - - # -----------------To Open Connections page----------------------- - try: - print("Verifying Connected Wifi Connection") - report.step_start("Click Network & internet in pixel4") - connElement = driver.find_element_by_xpath("//*[@text='Network & internet']") - connElement.click() - - # ---------------------Open WIFI page------------------------------- - try: - report.step_start("Clicking Wi-Fi") - print("Clicking WIFI") - time.sleep(3) - wifiElement = WebDriverWait(driver, 10).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Wi‑Fi']"))) - wifiElement.click() - - # --------------------To Turn on WIFi Switch if already OFF-------------------------------- - try: - driver.implicitly_wait(1) - get_switch_text_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - get_switch_text = get_switch_text_element.text - # if get_switch_text is not None: - # switch_text = "OFF" - # else: - # switch_text = "ON" - switch_text = get_switch_text - print("get_switch_text: ", switch_text) - print("Find wifi switch") - try: # To Turn on Wi-Fi Switch - if switch_text == "OFF": - # driver.implicitly_wait(3) - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(1) - get_switch_element.click() - driver.implicitly_wait(1) - i = 0 - for i in range(5): - if switch_text == "ON": - print("WIFI Switch is ON") - break - else: - try: - get_switch_text_element = driver.find_element_by_xpath( - "//*[@text='Add network']") - get_switch_text = get_switch_text_element.text - if get_switch_text == "Add network": - switch_text = "ON" - else: - switch_text = "OFF" - except NoSuchElementException: - print("Exception: Verify Xpath") - # Scroll Down - scrollDown(setup_perfectoMobile) - print("Sleeping for: ", i) - time.sleep(i) - pass - if switch_text == "OFF": - print("Switch is Still OFF") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - else: - print("Switch is already On") - check_if_no_internet_popup(driver) - except: - print("Couldn't turn on WIFI switch") - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # Verify if WiFi is connected - # ------------------------------------------------------- - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='android:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - # time.sleep(5) - check_if_no_internet_popup(driver) - except: - try: - check_if_no_internet_popup(driver) - WifiInternetErrMsg = WebDriverWait(driver, 35).until( - EC.presence_of_element_located((MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected without internet']/parent::*/android.widget.TextView[@text='"+ WifiName + "']"))) - print("Wifi Successfully Connected without internet") - check_if_no_internet_popup(driver) - except: - try: - report.step_start("Verify if Wifi is Connected") - WifiInternetErrMsg = WebDriverWait(driver, 60).until(EC.presence_of_element_located(( - MobileBy.XPATH, - "//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']"))) - ssid_with_internet = True - print("Wifi Successfully Connected") - except NoSuchElementException: - print("Wifi Connection Error: " + WifiName) - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - # ------------------------------------------------------- - - # Get into Additional Details - # To Get an IP Address - # To Forget connection - # To turn off auto. connect - # ------------------------------------------------------- - try: - print("Into additional details") - time.sleep(5) - report.step_start("Going for ip address") - additional_details_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - additional_details_element.click() - print("Entered ssid") - try: - time.sleep(10) - print("clicking Advanced") - report.step_start("clicking Advanced") - advanced_element = driver.find_element_by_xpath("//*[@text='Advanced']") - advanced_element.click() - print("clicked Advanced") - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]") - advanced_element.click() - #print("Device IP address is :", ip_address_element_text) - except: - try: - time.sleep(5) - print("clicking Advanced2") - advanced_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/recycler_view']/android.widget.LinearLayout[5]/android.widget.LinearLayout[1]/android.widget.ImageView[1]") - advanced_element.click() - except: - print("No advanced options") - # allure.attach(name= body=str("IP address element not found")) - - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - # Scroll Down - scrollDown(setup_perfectoMobile) - try: - time.sleep(2) - ip_address_element = driver.find_element_by_xpath( - "//*[@text='IP address']/parent::*/android.widget.TextView[@resource-id='android:id/summary']") - ip_address_element_text = ip_address_element.text - print("Device IP address is :", ip_address_element_text) - except: - print("IP address element not found") - #------------------------------- Forget SSID ---------------- - try: - check_if_no_internet_popup(driver) - forget_ssid = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/settings_button_no_background']") - forget_ssid.click() - print("Forgetting ssid") - - # ------------------------------- Wifi Switch ---------------- - try: - print("clicking on wifi switch") - get_switch_element = driver.find_element_by_xpath( - "//*[@resource-id='com.android.settings:id/switch_widget']") - driver.implicitly_wait(2) - get_switch_element.click() - except: - print("couldn't click on wifi switch") - # allure.attach(name= body=str("couldn't click on wifi switch")) - except: - print("Couldn't forget ssid") - # closeApp(connData["appPackage-android"], setup_perfectoMobile) - # return ip_address_element_text, ssid_with_internet - except: - print("Couldn't get into Additional settings") - # ------------------------------------------------------- - except: - print("No Switch element found") - # ---------------------To Turn on WIFi Switch if already OFF------------------------------- - - except: - print("Couldn't find wifi Button") - # ------------------Open WIFI page---------------------------------- - - except: - print("Exception: Verify Xpath - Update/check Xpath for Click Connections") - # -----------------To Open Connections page--------------------------- - - closeApp(connData["appPackage-android"], setup_perfectoMobile) - return ip_address_element_text, ssid_with_internet - -def get_phone_information(setup_perfectoMobile, search_this): - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - - report.step_start("Get DeviceID") - params = {'property': search_this} - device_information = driver.execute_script('mobile:handset:info', params) - print("device information for "+search_this+" is: ", device_information) - return device_information - -#------------Return upload download rate------------------------------ -def return_upload_download_speed_android(request, setup_perfectoMobile, get_APToMobileDevice_data): - print("\n-------------------------------------") - print("Verify Upload & Download Speed") - print("-------------------------------------") - - report = setup_perfectoMobile[1] - driver = setup_perfectoMobile[0] - connData = get_APToMobileDevice_data - - driver.switch_to.context('WEBVIEW_1') - - try: - print("Launching Chrome") - report.step_start("Google Home Page") - driver.get(connData["webURL"]) - print("Enter Search Text") - elementFindTxt = driver.find_element_by_xpath(connData["lblSearch"]) - elementFindTxt.send_keys("Internet Speed Test") - except Exception as e: - print("Launching Chrome Failed") - print (e) - # allure.attach(name="Speed Test logs: ", body=str("Launching Safari Failed")) - # allure.attach(name="Speed Test logs: ", body=str("Error log: " + e)) - - try: - print("Click Search Button") - report.step_start("Click Search Button") - time.sleep(2) - driver.implicitly_wait(2) - elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") - elelSearch.click() - print("Keyboard enter") - driver.press_keycode(66) - except: - try: - time.sleep(2) - driver.implicitly_wait(2) - elelSearch = driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[2]") - elelSearch.click() - except: - print("Search Drop Down not active...") - return False - - try: - print("Click Run Speed Test Button...") - report.step_start("Click Run Speed Test Button") - driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click() - except NoSuchElementException: - print("Error in speed test element ", NoSuchElementException) - # allure.attach(name="Speed Test logs: ", body=str("Search Run Speed Test not active..." + NoSuchElementException)) - return False - - #Get upload/Download Speed - try: - print("Get Download Speed") - report.step_start("Get upload/Download Speed") - time.sleep(60) - downloadMbps = driver.find_element_by_xpath(connData["downloadMbps"]) - downloadSpeed = downloadMbps.text - print("Download: " + downloadSpeed + " Mbps") - - print("Get Upload Speed") - report.step_start("Get Upload Speed") - UploadMbps = driver.find_element_by_xpath(connData["UploadMbps"]) - uploadSpeed = UploadMbps.text - print("Upload: " + uploadSpeed + " Mbps") - allure.attach(name="Speed Test logs: ", body=str("Upload: " + uploadSpeed + " Mbps" + " Download: " + downloadSpeed + " Mbps")) - print("Access Point Verification Completed Successfully") - except NoSuchElementException: - print("Access Point Verification NOT Completed, checking Connection....") - - return downloadSpeed, uploadSpeed - -def ookla_speed_test_android(request, setup_perfectoMobile, get_APToMobileDevice_data): - driver = setup_perfectoMobile[0] - driver.switch_to.context('NATIVE_APP') - openApp('org.zwanoo.android.speedtest', setup_perfectoMobile) - WebDriverWait(driver, 30).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@resource-id='org.zwanoo.android.speedtest:id/go_button']"))).click() - # Wait untill 2 minutes for the test to complete - WebDriverWait(driver, 120).until( - EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='Test Again']"))) - downloadSpeed = driver.find_element_by_xpath("//*[@text='DOWNLOAD']/parent::*/android.widget.TextView[3]").text - uploadSpeed = driver.find_element_by_xpath("//*[@text='UPLOAD']/parent::*/android.widget.TextView[3]").text - print(f"Download speed: {downloadSpeed}") - print(f"Upload speed: {uploadSpeed}") - return downloadSpeed, uploadSpeed \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/__init__.py b/libs/tip_1x/__init__.py similarity index 100% rename from tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/__init__.py rename to libs/tip_1x/__init__.py diff --git a/libs/tip_1x/controller.py b/libs/tip_1x/controller.py new file mode 100644 index 000000000..7bcf74844 --- /dev/null +++ b/libs/tip_1x/controller.py @@ -0,0 +1,1418 @@ +# !/usr/local/lib64/python3.8 +""" + Controller Library + 1. controller_data/sdk_base_url + 2. login credentials +""" +import base64 +import datetime +import json +import re +import ssl +import time +import urllib + +import requests +import swagger_client +from swagger_client import FirmwareManagementApi +from swagger_client import EquipmentGatewayApi +from bs4 import BeautifulSoup +import threading + + +class ConfigureController: + + def __init__(self): + self.configuration = swagger_client.Configuration() + + def set_credentials(self, controller_data=None): + if dict(controller_data).keys().__contains__("username") and dict(controller_data).keys().__contains__( + "password"): + self.configuration.username = controller_data["username"] + self.configuration.password = controller_data["password"] + print("Login Credentials set to custom: \n user_id: %s\n password: %s\n" % (controller_data["username"], + controller_data["password"])) + return True + else: + self.configuration.username = "support@example.com" + self.configuration.password = "support" + print("Login Credentials set to default: \n user_id: %s\n password: %s\n" % ("support@example.com", + "support")) + return False + + def select_controller_data(self, controller_data=None): + if dict(controller_data).keys().__contains__("url") is None: + print("No controller_data Selected") + exit() + self.sdk_base_url = controller_data["url"] + self.configuration.host = self.sdk_base_url + print("controller_data Selected: %s\n SDK_BASE_URL: %s\n" % (controller_data["url"], self.sdk_base_url)) + return True + + def set_sdk_base_url(self, sdk_base_url=None): + if sdk_base_url is None: + print("URL is None") + exit() + self.configuration.host = sdk_base_url + return True + + +""" + Library for cloud_controller_tests generic usages, it instantiate the bearer and credentials. + It provides the connectivity to the cloud. + Instantiate the Object by providing the controller_data=controller_url, customer_id=2 +""" + + +class Controller(ConfigureController): + """ + constructor for cloud_controller_tests library + """ + + def __init__(self, controller_data=None, customer_id=None): + super().__init__() + self.controller_data = controller_data + self.customer_id = customer_id + if customer_id is None: + self.customer_id = 2 + print("Setting to default Customer ID 2") + # + # Setting the Controller Client Configuration + self.select_controller_data(controller_data=controller_data) + self.set_credentials(controller_data=controller_data) + self.configuration.refresh_api_key_hook = self.get_bearer_token + + # Connecting to Controller + self.api_client = swagger_client.ApiClient(self.configuration) + self.login_client = swagger_client.LoginApi(api_client=self.api_client) + self.bearer = False + self.disconnect = False + # Token expiry in seconds + self.token_expiry = 1000 + self.token_timestamp = time.time() + try: + + self.bearer = self.get_bearer_token() + # t1 = threading.Thread(target=self.refresh_instance) + # t1.start() + self.api_client.default_headers['Authorization'] = "Bearer " + self.bearer._access_token + self.status_client = swagger_client.StatusApi(api_client=self.api_client) + self.equipment_client = swagger_client.EquipmentApi(self.api_client) + self.profile_client = swagger_client.ProfileApi(self.api_client) + self.api_client.configuration.api_key_prefix = { + "Authorization": "Bearer " + self.bearer._access_token + } + self.api_client.configuration.refresh_api_key_hook = self.refresh_instance + self.ping_response = self.portal_ping() + print("Portal details :: \n", self.ping_response) + except Exception as e: + self.bearer = False + print(e) + + print("Connected to Controller Server") + + def get_bearer_token(self): + request_body = { + "userId": self.configuration.username, + "password": self.configuration.password + } + return self.login_client.get_access_token(request_body) + + def refresh_instance(self): + # Refresh token 10 seconds before it's expiry + if time.time() - self.token_timestamp > self.token_expiry - 10: + self.token_timestamp = time.time() + print("Refreshing the controller API token") + self.disconnect_Controller() + self.api_client = swagger_client.ApiClient(self.configuration) + self.login_client = swagger_client.LoginApi(api_client=self.api_client) + self.bearer = self.get_bearer_token() + self.api_client.default_headers['Authorization'] = "Bearer " + self.bearer._access_token + self.status_client = swagger_client.StatusApi(api_client=self.api_client) + self.equipment_client = swagger_client.EquipmentApi(self.api_client) + self.profile_client = swagger_client.ProfileApi(self.api_client) + self.api_client.configuration.api_key_prefix = { + "Authorization": "Bearer " + self.bearer._access_token + } + self.api_client.configuration.refresh_api_key_hook = self.refresh_instance + self.ping_response = self.portal_ping() + print("Portal details :: \n", self.ping_response) + if self.ping_response._application_name != 'PortalServer': + print("Server not Reachable") + exit() + print("Connected to Controller Server") + + def portal_ping(self): + self.refresh_instance() + return self.login_client.portal_ping() + + def disconnect_Controller(self): + self.refresh_instance() + self.disconnect = True + self.api_client.__del__() + + # Returns a List of All the Equipments that are available in the cloud instances + def get_equipment_by_customer_id(self, max_items=10): + self.refresh_instance() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": """ + str(max_items) + """ + }""" + self.refresh_instance() + equipment_data = self.equipment_client.get_equipment_by_customer_id(customer_id=self.customer_id, + pagination_context=pagination_context) + return equipment_data._items + + # check if equipment with the given equipment_id is available in cloud instance or not + def validate_equipment_availability(self, equipment_id=None): + self.refresh_instance() + data = self.get_equipment_by_customer_id() + for i in data: + if i._id == equipment_id: + return i._id + return -1 + + # Need to be added in future + def request_ap_reboot(self): + self.refresh_instance() + pass + + # Get the equipment id, of a equipment with a serial number + def get_equipment_id(self, serial_number=None): + self.refresh_instance() + equipment_data = self.get_equipment_by_customer_id(max_items=100) + # print(len(equipment_data)) + for equipment in equipment_data: + if equipment._serial == serial_number: + return equipment._id + + # Get the equipment model name of a given equipment_id + def get_model_name(self, equipment_id=None): + self.refresh_instance() + if equipment_id is None: + return None + self.refresh_instance() + data = self.equipment_client.get_equipment_by_id(equipment_id=equipment_id) + print(str(data._details._equipment_model)) + return str(data._details._equipment_model) + + # Needs Bug fix from swagger code generation side + def get_ap_firmware_new_method(self, equipment_id=None): + self.refresh_instance() + response = self.status_client.get_status_by_customer_equipment(customer_id=self.customer_id, + equipment_id=equipment_id) + print(response[2]) + + # Old Method, will be depreciated in future + def get_ap_firmware_old_method(self, equipment_id=None): + self.refresh_instance() + url = self.configuration.host + "/portal/status/forEquipment?customerId=" + str( + self.customer_id) + "&equipmentId=" + str(equipment_id) + payload = {} + headers = self.configuration.api_key_prefix + response = requests.request("GET", url, headers=headers, data=payload) + + if response.status_code == 200: + status_data = response.json() + # print(status_data) + try: + current_ap_fw = status_data[2]['details']['reportedSwVersion'] + # print(current_ap_fw) + return current_ap_fw + except Exception as e: + print(e) + current_ap_fw = "error" + return e + + else: + return False + + """ + Profile Utilities + """ + + def get_current_profile_on_equipment(self, equipment_id=None): + self.refresh_instance() + default_equipment_data = self.equipment_client.get_equipment_by_id(equipment_id=equipment_id, async_req=False) + return default_equipment_data._profile_id + + # Get the ssid's that are used by the equipment + def get_ssids_on_equipment(self, equipment_id=None): + self.refresh_instance() + profile_id = self.get_current_profile_on_equipment(equipment_id=equipment_id) + all_profiles = self.profile_client.get_profile_with_children(profile_id=profile_id) + ssid_name_list = [] + for i in all_profiles: + if i._profile_type == "ssid": + ssid_name_list.append(i._details['ssid']) + return all_profiles + + # Get the child ssid profiles that are used by equipment ap profile of given profile id + def get_ssid_profiles_from_equipment_profile(self, profile_id=None): + self.refresh_instance() + equipment_ap_profile = self.profile_client.get_profile_by_id(profile_id=profile_id) + ssid_name_list = [] + child_profile_ids = equipment_ap_profile.child_profile_ids + for i in child_profile_ids: + profile = self.profile_client.get_profile_by_id(profile_id=i) + if profile._profile_type == "ssid": + ssid_name_list.append(profile._details['ssid']) + return ssid_name_list + + +""" + Library for Profile Utility, Creating Profiles and Pushing and Deleting them + Steps to create a Profile on Controller: + create a RF Profile + create a Radius Profile + create ssid profiles, and add the radius profile in them, if needed (only used by eap ssid's) + + create equipment_ap profile, and add the rf profile and ssid profiles + Now using push profile method, equipment_ap profile will be pushed to an AP of given equipment_id + +""" + + +class ProfileUtility: + """ + constructor for Access Point Utility library + """ + + def __init__(self, sdk_client=None, controller_data=None, customer_id=None): + if sdk_client is None: + sdk_client = Controller(controller_data=controller_data, customer_id=customer_id) + self.sdk_client = sdk_client + self.sdk_client.refresh_instance() + self.profile_client = swagger_client.ProfileApi(api_client=self.sdk_client.api_client) + self.profile_creation_ids = { + "ssid": [], + "ap": [], + "radius": [], + "rf": [], + "passpoint_osu_id_provider": [], + "passpoint_operator": [], + "passpoint_venue": [], + "passpoint": [] + } + self.profile_name_with_id = {} + self.default_profiles = {} + self.profile_ids = [] + + def cleanup_objects(self): + self.sdk_client.refresh_instance() + self.profile_creation_ids = { + "ssid": [], + "ap": [], + "radius": [], + "rf": [], + "passpoint_osu_id_provider": [], + "passpoint_operator": [], + "passpoint_venue": [], + "passpoint": [] + } + self.profile_name_with_id = {} + self.default_profiles = {} + self.profile_ids = [] + + def get_profile_by_name(self, profile_name=None): + self.sdk_client.refresh_instance() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 1000 + }""" + profiles = self.profile_client.get_profiles_by_customer_id(customer_id=self.sdk_client.customer_id, + pagination_context=pagination_context) + + for i in profiles._items: + if i._name == profile_name: + return i + return None + + def get_ssid_name_by_profile_id(self, profile_id=None): + self.sdk_client.refresh_instance() + profiles = self.profile_client.get_profile_by_id(profile_id=profile_id) + return profiles._details["ssid"] + + """ + default templates are as follows : + profile_name= TipWlan-rf/ + Radius-Profile/ + TipWlan-2-Radios/ + TipWlan-3-Radios/ + TipWlan-Cloud-Wifi/ + Captive-Portal + """ + + def get_default_profiles(self): + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 100 + }""" + self.sdk_client.refresh_instance() + items = self.profile_client.get_profiles_by_customer_id(customer_id=self.sdk_client.customer_id, + pagination_context=pagination_context) + + for i in items._items: + # print(i._name, i._id) + if i._name == "TipWlan-Cloud-Wifi": + self.default_profiles['ssid'] = i + if i._name == "TipWlan-3-Radios": + self.default_profiles['equipment_ap_3_radios'] = i + if i._name == "TipWlan-2-Radios": + self.default_profiles['equipment_ap_2_radios'] = i + if i._name == "Captive-Portal": + self.default_profiles['captive_portal'] = i + if i._name == "Radius-Profile": + self.default_profiles['radius'] = i + if i._name == "TipWlan-rf": + self.default_profiles['rf'] = i + # print(i) + + # This will delete the Profiles associated with an equipment of givwn equipment_id, and associate it to default + # equipment_ap profile + def delete_current_profile(self, equipment_id=None): + self.sdk_client.refresh_instance() + equipment_data = self.sdk_client.equipment_client.get_equipment_by_id(equipment_id=equipment_id) + + data = self.profile_client.get_profile_with_children(profile_id=equipment_data._profile_id) + delete_ids = [] + for i in data: + if i._name == "TipWlan-rf": + continue + else: + delete_ids.append(i._id) + # print(delete_ids) + self.get_default_profiles() + self.profile_creation_ids['ap'] = self.default_profiles['equipment_ap_3_radios']._id + # print(self.profile_creation_ids) + self.push_profile_old_method(equipment_id=equipment_id) + self.delete_profile(profile_id=delete_ids) + + # This will delete all the profiles on an controller instance, except the default profiles + def cleanup_profiles(self): + self.sdk_client.refresh_instance() + try: + self.get_default_profiles() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 10000 + }""" + skip_delete_id = [] + for i in self.default_profiles: + skip_delete_id.append(self.default_profiles[i]._id) + + all_profiles = self.profile_client.get_profiles_by_customer_id(customer_id=self.sdk_client.customer_id, + pagination_context=pagination_context) + + delete_ids = [] + for i in all_profiles._items: + delete_ids.append(i._id) + skip_delete_id = [] + for i in self.default_profiles: + skip_delete_id.append(self.default_profiles[i]._id) + delete_ids = list(set(delete_ids) - set(delete_ids).intersection(set(skip_delete_id))) + print(delete_ids) + for i in delete_ids: + self.set_equipment_to_profile(profile_id=i) + self.delete_profile(profile_id=delete_ids) + status = True + except Exception as e: + print(e) + status = False + return status + + # Delete any profile with the given name + def delete_profile_by_name(self, profile_name=None): + self.sdk_client.refresh_instance() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 5000 + }""" + all_profiles = self.profile_client.get_profiles_by_customer_id(customer_id=self.sdk_client.customer_id, + pagination_context=pagination_context) + for i in all_profiles._items: + if i._name == profile_name: + counts = self.profile_client.get_counts_of_equipment_that_use_profiles([i._id])[0] + if counts._value2: + self.set_equipment_to_profile(profile_id=i._id) + self.delete_profile(profile_id=[i._id]) + else: + self.delete_profile(profile_id=[i._id]) + + # This method will set all the equipments to default equipment_ap profile, those having the profile_id passed in + # argument + def set_equipment_to_profile(self, profile_id=None): + self.sdk_client.refresh_instance() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 5000 + }""" + equipment_data = self.sdk_client.equipment_client. \ + get_equipment_by_customer_id(customer_id=2, + pagination_context=pagination_context) + self.get_default_profiles() + for i in equipment_data._items: + if i._profile_id == profile_id: + self.profile_creation_ids['ap'] = self.default_profiles['equipment_ap_2_radios']._id + self.push_profile_old_method(equipment_id=i._id) + time.sleep(2) + + """ + method call: used to create the rf profile and push set the parameters accordingly and update + Library method to create a new rf profile: Now using default profile + """ + + def set_rf_profile(self, profile_data=None, mode=None): + self.sdk_client.refresh_instance() + self.get_default_profiles() + if mode == "wifi5": + default_profile = self.default_profiles['rf'] + default_profile._name = profile_data["name"] + + default_profile._details["rfConfigMap"]["is2dot4GHz"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHz"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHzL"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHzU"]["rf"] = profile_data["name"] + for i in default_profile._details["rfConfigMap"]: + for j in profile_data: + if i == j: + for k in default_profile._details["rfConfigMap"][i]: + for l in profile_data[j]: + if l == k: + default_profile._details["rfConfigMap"][i][l] = profile_data[j][l] + profile = self.profile_client.create_profile(body=default_profile) + self.profile_creation_ids['rf'].append(profile._id) + return profile + if mode == "wifi6": + default_profile = self.default_profiles['rf'] + default_profile._name = profile_data["name"] + default_profile._details["rfConfigMap"]["is2dot4GHz"]["activeScanSettings"]["enabled"] = False + default_profile._details["rfConfigMap"]["is2dot4GHz"]["radioMode"] = 'modeAX' + default_profile._details["rfConfigMap"]["is5GHz"]["radioMode"] = 'modeAX' + default_profile._details["rfConfigMap"]["is5GHzL"]["radioMode"] = 'modeAX' + default_profile._details["rfConfigMap"]["is5GHzU"]["radioMode"] = 'modeAX' + default_profile._details["rfConfigMap"]["is2dot4GHz"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHz"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHzL"]["rf"] = profile_data["name"] + default_profile._details["rfConfigMap"]["is5GHzU"]["rf"] = profile_data["name"] + default_profile._name = profile_data["name"] + for i in default_profile._details["rfConfigMap"]: + for j in profile_data: + if i == j: + for k in default_profile._details["rfConfigMap"][i]: + for l in profile_data[j]: + if l == k: + default_profile._details["rfConfigMap"][i][l] = profile_data[j][l] + profile = self.profile_client.create_profile(body=default_profile) + self.profile_creation_ids['rf'].append(profile._id) + return profile + + """ + method call: used to create a ssid profile with the given parameters + """ + + # Open + def create_open_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'open' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + self.profile_name_with_id[profile_data["ssid_name"]] = profile_id + except Exception as e: + print(e) + profile = "error" + + return profile + + # wpa personal + def create_wpa_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + self.get_default_profiles() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['keyStr'] = profile_data['security_key'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wpaPSK' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa2 personal + def create_wpa2_personal_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['keyStr'] = profile_data['security_key'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wpa2OnlyPSK' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa3 personal + def create_wpa3_personal_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['keyStr'] = profile_data['security_key'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wpa3OnlySAE' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa3 personal mixed mode + def create_wpa3_personal_mixed_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['keyStr'] = profile_data['security_key'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wpa3MixedSAE' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa wpa2 personal mixed mode + def create_wpa_wpa2_personal_mixed_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['keyStr'] = profile_data['security_key'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wpa2PSK' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa enterprise done + def create_wpa_enterprise_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details['secureMode'] = 'wpaRadius' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa wpa2 enterprise mixed mode done + def create_wpa_wpa2_enterprise_mixed_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details['secureMode'] = 'wpa2Radius' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa2 enterprise mode ssid profile + def create_wpa2_enterprise_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details['secureMode'] = 'wpa2OnlyRadius' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa3 enterprise mode + def create_wpa3_enterprise_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details['secureMode'] = 'wpa3OnlyEAP' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa3 enterprise mixed mode done + def create_wpa3_enterprise_mixed_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details['secureMode'] = 'wpa3MixedEAP' + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # wpa3 enterprise mixed mode done + def create_wep_ssid_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + try: + if profile_data is None: + return False + default_profile = self.default_profiles['ssid'] + default_profile._details['appliedRadios'] = profile_data["appliedRadios"] + default_profile._name = profile_data['profile_name'] + default_profile._details['vlanId'] = profile_data['vlan'] + default_profile._details['ssid'] = profile_data['ssid_name'] + default_profile._details['forwardMode'] = profile_data['mode'] + default_profile._details['secureMode'] = 'wep' + default_profile._details['wepConfig'] = {} + default_profile._details['wepConfig']["model_type"] = "WepConfiguration" + default_profile._details['wepConfig']["wepAuthType"] = "open" + default_profile._details['wepConfig']["primaryTxKeyId"] = profile_data["default_key_id"] + default_profile._details['wepConfig']["wepKeys"] = [{'model_type': 'WepKey', + 'txKey': profile_data["wep_key"], + 'txKeyConverted': None, + 'txKeyType': 'wep64'}, + {'model_type': 'WepKey', + 'txKey': profile_data["wep_key"], + 'txKeyConverted': None, + 'txKeyType': 'wep64'}, + {'model_type': 'WepKey', + 'txKey': profile_data["wep_key"], + 'txKeyConverted': None, + 'txKeyType': 'wep64'}, + {'model_type': 'WepKey', + 'txKey': profile_data["wep_key"], + 'txKeyConverted': None, + 'txKeyType': 'wep64'}] + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids['ssid'].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + def __get_boolean(self, flag): + return 'true' if flag in ["Enabled", "True"] else 'false' + + # wpa eap general method + def __create_wpa_eap_passpoint_ssid_profiles(self, profile_data=None, secure_mode=None): + try: + if profile_data is None or secure_mode is None: + return False + default_profile = self.default_profiles["ssid"] + default_profile._details["appliedRadios"] = profile_data["appliedRadios"] + default_profile._name = profile_data["profile_name"] + default_profile._details["vlanId"] = profile_data["vlan"] + default_profile._details["ssid"] = profile_data["ssid_name"] + default_profile._details["forwardMode"] = profile_data["mode"] + default_profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + default_profile._child_profile_ids = self.profile_creation_ids["radius"] + default_profile._details["secureMode"] = secure_mode + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids["ssid"].append(profile_id) + self.profile_ids.append(profile_id) + self.profile_name_with_id[profile_data["ssid_name"]] = profile_id + except Exception as e: + print(e) + profile = False + return profile + + # wpa eap passpoint + def create_wpa_eap_passpoint_ssid_profile(self, profile_data=None): + if profile_data is None: + return False + return self.__create_wpa_eap_passpoint_ssid_profiles(profile_data, "wpaEAP") + + # wpa2 eap passpoint + def create_wpa2_eap_passpoint_ssid_profile(self, profile_data=None): + if profile_data is None: + return False + return self.__create_wpa_eap_passpoint_ssid_profiles(profile_data, "wpa2EAP") + + # wpa2only eap passpoint + def create_wpa2_only_eap_passpoint_ssid_profile(self, profile_data=None): + if profile_data is None: + return False + return self.__create_wpa_eap_passpoint_ssid_profiles(profile_data, "wpa2OnlyEAP") + + # passpoint osu id provider profile + def create_passpoint_osu_id_provider_profile(self, profile_data=None): + try: + if profile_data is None: + return False + default_profile = dict() + default_profile["model_type"] = "Profile" + default_profile["customerId"] = self.sdk_client.customer_id + default_profile["profileType"] = "passpoint_osu_id_provider" + default_profile["name"] = profile_data["profile_name"] + details = dict() + details["model_type"] = "PasspointOsuProviderProfile" + mcc_mnc = dict() + if (profile_data["mcc"] and profile_data["mnc"]) is not None: + mcc_mnc = {"mcc": profile_data["mcc"], "mnc": profile_data["mnc"]} + if profile_data["network"] is not None: + mcc_mnc["network"] = profile_data["network"] + if mcc_mnc: + details["mccMncList"] = [mcc_mnc] + if (profile_data["mcc"] and profile_data["mnc"]) is not None: + details["mccMncList"] = [{"mcc": profile_data["mcc"], "mnc": profile_data["mnc"]}] + if profile_data["osu_nai_standalone"] is not None: + details["osuNaiStandalone"] = profile_data["osu_nai_standalone"] + if profile_data["osu_nai_shared"] is not None: + details["osuNaiShared"] = profile_data["osu_nai_shared"] + if profile_data["nai_realms"] is not None: + details["naiRealmList"] = [{"naiRealms": [profile_data["nai_realms"]["domain"]], + "encoding": profile_data["nai_realms"]["encoding"], + "eapMap": profile_data["nai_realms"]["eap_map"] + }] + details["roamingOi"] = profile_data["roaming_oi"] + default_profile['details'] = details + default_profile['childProfileIds'] = [] + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids["passpoint_osu_id_provider"].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # passpoint operator profile + def create_passpoint_operator_profile(self, profile_data=None): + try: + if profile_data is None: + return False + default_profile = dict() + default_profile["model_type"] = "Profile" + default_profile["customerId"] = self.sdk_client.customer_id + default_profile["profileType"] = "passpoint_operator" + default_profile["name"] = profile_data["profile_name"] + + default_profile["details"] = dict() + default_profile["details"]["model_type"] = "PasspointOperatorProfile" + default_profile["details"]["serverOnlyAuthenticatedL2EncryptionNetwork"] = \ + self.__get_boolean(profile_data["osen"]) + operator_names = [] + operators = profile_data["operator_names"] + for operator in profile_data["operator_names"]: + operator_temp = dict() + for key in operator.keys(): + if key == "name": + operator_temp["dupleName"] = operator["name"] + else: + operator_temp[key] = operator[key] + operator_names.append(operator_temp) + default_profile["details"]["operatorFriendlyName"] = operator_names + default_profile["details"]["domainNameList"] = profile_data["domain_name_list"] + default_profile["childProfileIds"] = [] + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids["passpoint_operator"].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + profile = False + return profile + + # passpoint venue profile + def create_passpoint_venue_profile(self, profile_data=None): + try: + if profile_data is None: + return False + default_profile = dict() + default_profile["model_type"] = "Profile" + default_profile["customerId"] = self.sdk_client.customer_id + default_profile["profileType"] = "passpoint_venue" + default_profile["name"] = profile_data["profile_name"] + default_profile["details"] = dict() + default_profile["details"]["model_type"] = "PasspointVenueProfile" + venue_names = [] + for venue in profile_data["venue_names"]: + venue_temp = dict() + for key in venue.keys(): + if key == "name": + venue_temp["dupleName"] = venue["name"] + if key == "url": + venue_temp["venueUrl"] = venue["url"] + venue_names.append(venue_temp) + default_profile["details"]["venueNameSet"] = venue_names + allowed_venue_groups = {"Unspecified": 0, "Assembly": 1, "Business": 2, "Educational": 3, + "Factory and Industrial": 4, "Institutional": 5, "Mercantile": 6, "Residential": 7} + allowed_venue_types = {"Unspecified Assembly": 0, "Areana": 1, "Stadium": 2, "Passenger Terminal": 3, + "Amphitheatre": 4, "Amusement Park": 5, "Place of Worship": 6, + "Convention Center": 7, + "Library": 8, "Museum": 9, "Restaurant": 10, "Theatre": 11, "Bar": 12, + "Coffee Shop": 13, + "Zoo or Aquarium": 14, "Emergency Coordination Center": 15, + "Unspecified Business": 0, "Doctor or Dentist office": 1, "Bank": 2, + "Fire Station": 3, + "Police Station": 4, "Post Office": 5, "Professional Office": 6, + "Research and Development Facility": 7, "Attorney Office": 8, + "Unspecified Educational": 0, "School, Primary": 1, "School, Secondary": 2, + "University or College": 3, "Unspecified Factory and Industrial": 0, "Factory": 1, + "Unspecified Institutional": 0, "Hospital": 1, "Long-Term Care Facility": 2, + "Alcohol and Drug Re-habilitation Center": 3, "Group Home": 4, "Prison or Jail": 5, + "Unspecified Mercantile": 0, "Retail Store": 1, "Grocery Market": 2, + "Automotive Service Station": 3, "Shopping Mall": 4, "Gas Station": 5, + "Unspecified Residential": 0, "Pivate Residence": 1, "Hotel or Model": 2, + "Dormitory": 3, "Boarding House": 4} + default_profile["details"]["venueTypeAssignment"] = {"venueGroupId": + allowed_venue_groups[ + profile_data["venue_type"]["group"]], + "venueTypeId": + allowed_venue_types[ + profile_data["venue_type"]["type"]]} + default_profile["childProfileIds"] = [] + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids["passpoint_venue"].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + # passpoint profile + def create_passpoint_profile(self, profile_data=None): + try: + if profile_data is None: + return False + default_profile = dict() + default_profile["model_type"] = "Profile" + default_profile["customerId"] = self.sdk_client.customer_id + default_profile["profileType"] = "passpoint" + default_profile["name"] = profile_data["profile_name"] + + default_profile["details"] = dict() + default_profile["details"]["model_type"] = "PasspointProfile" + default_profile["details"]["enableInterworkingAndHs20"] = self.__get_boolean( + profile_data["interworking_hs2dot0"]) + if profile_data["hessid"] is not None: + default_profile["details"]["hessid"] = dict() + default_profile["details"]["hessid"]["addressAsString"] = profile_data["hessid"] + default_profile["details"]["passpointAccessNetworkType"] = \ + profile_data["access_network"]["Access Network Type"].replace(' ', '_').lower() + default_profile["details"]["passpointNetworkAuthenticationType"] = \ + profile_data["access_network"]["Authentication Type"].replace('&', 'and').replace(' ', '_').lower() + default_profile["details"]["emergencyServicesReachable"] = self.__get_boolean( + profile_data["access_network"][ + "Emergency Services Reachable"]) + default_profile["details"]["unauthenticatedEmergencyServiceAccessible"] = self.__get_boolean( + profile_data["access_network"][ + "Unauthenticated Emergency Service"]) + default_profile["details"]["internetConnectivity"] = self.__get_boolean(profile_data["ip_connectivity"][ + "Internet Connectivity"]) + capability_set = [] + for cap in profile_data["ip_connectivity"]["Connection Capability"]: + capability_info = dict() + capability_info["connectionCapabilitiesPortNumber"] = cap["port"] + capability_info["connectionCapabilitiesIpProtocol"] = cap["protocol"] + capability_info["connectionCapabilitiesStatus"] = cap["status"] + capability_set.append(capability_info) + default_profile["details"]["connectionCapabilitySet"] = capability_set + default_profile["details"]["ipAddressTypeAvailability"] = profile_data["ip_connectivity"]["IP Address Type"] + allowed_gas_address_behavior = {"P2P Spec Workaround From Request": "p2pSpecWorkaroundFromRequest", + "forceNonCompliantBehaviourFromRequest": "forceNonCompliantBehaviourFromRequest", + "IEEE 80211 Standard Compliant Only": "ieee80211StandardCompliantOnly"} + default_profile["details"]["gasAddr3Behaviour"] = allowed_gas_address_behavior[ + profile_data["ip_connectivity"] + ["GAS Address 3 Behaviour"]] + default_profile["details"]["anqpDomainId"] = profile_data["ip_connectivity"]["ANQP Domain ID"] + default_profile["details"]["disableDownstreamGroupAddressedForwarding"] = self.__get_boolean( + profile_data["ip_connectivity"][ + "Disable DGAF"]) + default_profile["details"]["associatedAccessSsidProfileIds"] = profile_data["allowed_ssids"] + default_profile["details"]["passpointOperatorProfileId"] = self.profile_creation_ids["passpoint_operator"][0] + default_profile["details"]["passpointVenueProfileId"] = self.profile_creation_ids["passpoint_venue"][0] + default_profile["details"]["passpointOsuProviderProfileIds"] = self.profile_creation_ids[ + "passpoint_osu_id_provider"] + default_profile["details"]["accessNetworkType"] = \ + profile_data["access_network"]["Access Network Type"].replace(' ', '_').lower() + # osuSsidProfileId is needed for R2 + default_profile["details"]["networkAuthenticationType"] = \ + profile_data["access_network"]["Authentication Type"].replace('&', 'and').replace(' ', '_').lower() + default_profile["childProfileIds"] = self.profile_creation_ids["passpoint_venue"] + \ + self.profile_creation_ids["passpoint_operator"] + \ + self.profile_creation_ids["passpoint_osu_id_provider"] + profile = self.profile_client.create_profile(body=default_profile) + profile_id = profile._id + self.profile_creation_ids["passpoint"].append(profile_id) + self.profile_ids.append(profile_id) + except Exception as e: + print(e) + profile = False + return profile + + """ + method call: used to create a ap profile that contains the given ssid profiles + """ + + def set_ap_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + if profile_data is None: + return False + default_profile = self.default_profiles['equipment_ap_2_radios'] + default_profile._child_profile_ids = [] + for i in self.profile_creation_ids: + if i not in ["ap", "passpoint_osu_id_provider", "passpoint_operator", "passpoint_venue", "passpoint", + "radius"]: + for j in self.profile_creation_ids[i]: + default_profile._child_profile_ids.append(j) + + default_profile._name = profile_data['profile_name'] + # print(default_profile) + default_profile = self.profile_client.create_profile(body=default_profile) + self.profile_creation_ids['ap'] = default_profile._id + self.profile_ids.append(default_profile._id) + return default_profile + + """ + method call: used to create a ap profile that contains the given ssid profiles + """ + + def set_ap_profile_custom(self, profile_data=None): + self.sdk_client.refresh_instance() + if profile_data is None: + return False + default_profile = self.default_profiles['equipment_ap_2_radios'] + default_profile._child_profile_ids = [] + for i in self.profile_creation_ids: + if i not in ["ap", "passpoint_osu_id_provider", "passpoint_operator", "passpoint_venue", "passpoint", + "radius", "ssid"]: + for j in self.profile_creation_ids[i]: + default_profile._child_profile_ids.append(j) + for ssid in profile_data["ssid_names"]: + default_profile._child_profile_ids.append(self.profile_name_with_id[ssid]) + default_profile._name = profile_data['profile_name'] + default_profile = self.profile_client.create_profile(body=default_profile) + self.profile_creation_ids['ap'] = default_profile._id + self.profile_ids.append(default_profile._id) + return default_profile + + """ + method call: used to create a ap profile that contains the specific ssid profiles + """ + + def update_ap_profile(self, profile_data=None): + self.sdk_client.refresh_instance() + if profile_data is None: + print("profile info is None, Please specify the profile info that you want to update") + return False + + child_profiles_to_apply = [] + try: + for ssid in profile_data["ssid_names"]: + child_profiles_to_apply.append(self.profile_name_with_id[ssid]) + default_profile = self.get_profile_by_name(profile_name=profile_data["profile_name"]) + for i in self.profile_creation_ids: + if i not in ["ap", "passpoint_osu_id_provider", "passpoint_operator", "passpoint_venue", "passpoint", + "radius", "ssid"]: + for j in self.profile_creation_ids[i]: + child_profiles_to_apply.append(j) + default_profile._child_profile_ids = child_profiles_to_apply + default_profile = self.profile_client.update_profile(default_profile) + return True + except Exception as e: + print(e) + return False + + """ + method call: used to create a radius profile with the settings given + """ + + def create_radius_profile(self, radius_info=None, radius_accounting_info=None): + self.sdk_client.refresh_instance() + default_profile = self.default_profiles['radius'] + default_profile._name = radius_info['name'] + default_profile._details['primaryRadiusAuthServer'] = {} + default_profile._details['primaryRadiusAuthServer']['ipAddress'] = radius_info['ip'] + default_profile._details['primaryRadiusAuthServer']['port'] = radius_info['port'] + default_profile._details['primaryRadiusAuthServer']['secret'] = radius_info['secret'] + if radius_accounting_info is not None: + default_profile._details["primaryRadiusAccountingServer"] = {} + default_profile._details["primaryRadiusAccountingServer"]["ipAddress"] = radius_accounting_info["ip"] + default_profile._details["primaryRadiusAccountingServer"]["port"] = radius_accounting_info["port"] + default_profile._details["primaryRadiusAccountingServer"]["secret"] = radius_accounting_info["secret"] + default_profile = self.profile_client.create_profile(body=default_profile) + self.profile_creation_ids['radius'] = [default_profile._id] + self.profile_ids.append(default_profile._id) + return default_profile + + """ + method to push the profile to the given equipment + """ + + # Under a Bug, depreciated until resolved, should be used primarily + def push_profile(self, equipment_id=None): + self.sdk_client.refresh_instance() + pagination_context = """{ + "model_type": "PaginationContext", + "maxItemsPerPage": 100 + }""" + default_equipment_data = self.sdk_client.equipment_client.get_equipment_by_id(equipment_id=11, async_req=False) + # default_equipment_data._details[] = self.profile_creation_ids['ap'] + # print(default_equipment_data) + # print(self.sdk_client.equipment_client.update_equipment(body=default_equipment_data, async_req=True)) + + """ + method to verify if the expected ssid's are loaded in the ap vif config + """ + + def update_ssid_name(self, profile_name=None, new_profile_name=None): + self.sdk_client.refresh_instance() + if profile_name is None: + print("profile name is None, Please specify the ssid profile name that you want to modify") + return False + if new_profile_name is None: + print("Please specify the new name for ssid profile that you want to make to") + return False + + try: + profile = self.get_profile_by_name(profile_name=profile_name) + profile._details['ssid'] = new_profile_name + self.profile_client.update_profile(profile) + return True + except Exception as e: + return False + + def update_ssid_profile(self, profile_info=None): + self.sdk_client.refresh_instance() + if profile_info is None: + print("profile info is None, Please specify the profile info that you want to update") + return False + + try: + profile = self.get_profile_by_name(profile_name=profile_info["ssid_profile_name"]) + profile._details["radiusServiceId"] = self.profile_creation_ids["radius"][0] + profile._child_profile_ids = self.profile_creation_ids["radius"] + self.profile_creation_ids["passpoint"] + if "radius_configuration" in profile_info.keys(): + if "radius_acounting_service_interval" in profile_info["radius_configuration"].keys(): + profile._details["radiusAcountingServiceInterval"] = profile_info["radius_configuration"]["radius_acounting_service_interval"] + if "user_defined_nas_id" in profile_info["radius_configuration"].keys(): + profile._details["radiusClientConfiguration"]["userDefinedNasId"] = profile_info["radius_configuration"]["user_defined_nas_id"] + if "operator_id" in profile_info["radius_configuration"].keys(): + profile._details["radiusClientConfiguration"]["operatorId"] = profile_info["radius_configuration"]["operator_id"] + self.profile_client.update_profile(profile) + return True + except Exception as e: + print(e) + return False + + def clear_ssid_profile(self, profile_name=None): + if profile_name is None: + print("profile name is None, Please specify the ssid profile name that you want to update") + return False + + try: + profile = self.get_profile_by_name(profile_name=profile_name) + profile._details["radiusServiceId"] = None + profile._child_profile_ids = [] + self.profile_client.update_profile(profile) + return True + except Exception as e: + print(e) + return False + + """ + method to delete a profile by its id + """ + + def delete_profile(self, profile_id=None): + self.sdk_client.refresh_instance() + for i in profile_id: + self.profile_client.delete_profile(profile_id=i) + + # Need to be depreciated by using push_profile method + def push_profile_old_method(self, equipment_id=None): + self.sdk_client.refresh_instance() + if equipment_id is None: + return 0 + url = self.sdk_client.configuration.host + "/portal/equipment?equipmentId=" + str(equipment_id) + payload = {} + headers = self.sdk_client.configuration.api_key_prefix + response = requests.request("GET", url, headers=headers, data=payload) + equipment_info = response.json() + equipment_info['profileId'] = self.profile_creation_ids['ap'] + url = self.sdk_client.configuration.host + "/portal/equipment" + headers = { + 'Content-Type': 'application/json', + 'Authorization': self.sdk_client.configuration.api_key_prefix['Authorization'] + } + + response = requests.request("PUT", url, headers=headers, data=json.dumps(equipment_info)) + return response + + +""" + + FirmwareUtility class + uses JfrogUtility base class + sdk_client [ controller_tests instance ] + controller_data [ sdk_base_url ] needed only if sdk_instance is not passed + customer_id [ 2 ] needed only if sdk_instance is not passed +""" + + +class FirmwareUtility: + + def __init__(self, + sdk_client=None, + jfrog_credentials=None, + controller_data=None, + customer_id=2, + model=None, + version_url=None): + # super().__init__(credentials=jfrog_credentials) + if sdk_client is None: + sdk_client = Controller(controller_data=controller_data, customer_id=customer_id) + self.sdk_client = sdk_client + self.sdk_client.refresh_instance() + self.firmware_client = FirmwareManagementApi(api_client=sdk_client.api_client) + # self.jfrog_client = JFrogUtility(credentials=jfrog_credentials) + self.equipment_gateway_client = EquipmentGatewayApi(api_client=sdk_client.api_client) + self.model = model + self.fw_version = version_url + + def get_fw_version(self): + fw_version = self.fw_version.split("/")[-1] + return fw_version + + def upload_fw_on_cloud(self, force_upload=False): + self.sdk_client.refresh_instance() + fw_version = self.fw_version.split("/")[-1] + print("Upload fw version :", self.fw_version) + fw_id = self.is_fw_available(fw_version=fw_version) + if fw_id and not force_upload: + print("Skipping upload, Firmware Already Available", "Force Upload :", force_upload) + # Don't Upload the fw + return fw_id + else: + if fw_id and force_upload: + print("Firmware Version Already Available, Deleting and Uploading Again", + " Force Upload :", force_upload) + self.firmware_client.delete_firmware_version(firmware_version_id=fw_id) + print("Deleted Firmware Image from cloud, uploading again") + time.sleep(2) + # if force_upload is true and latest image available, then delete the image + firmware_data = { + "id": 0, + "equipmentType": "AP", + "modelId": str(self.model).upper(), + "versionName": fw_version, + "description": fw_version + " FW VERSION", + "filename": self.fw_version, + } + firmware_id = self.firmware_client.create_firmware_version(body=firmware_data) + print("Uploaded the Image: ", fw_version) + return firmware_id._id + + def upgrade_fw(self, equipment_id=None, force_upgrade=False, force_upload=False): + self.sdk_client.refresh_instance() + if equipment_id is None: + print("No Equipment Id Given") + exit() + if (force_upgrade is True) or (self.should_upgrade_ap_fw(equipment_id=equipment_id)): + firmware_id = self.upload_fw_on_cloud(force_upload=force_upload) + time.sleep(5) + try: + obj = self.equipment_gateway_client.request_firmware_update(equipment_id=equipment_id, + firmware_version_id=firmware_id) + print("Request firmware upgrade Success! waiting for 300 sec") + time.sleep(400) + except Exception as e: + print(e) + obj = False + return obj + # Write the upgrade fw logic here + + def should_upgrade_ap_fw(self, equipment_id=None): + self.sdk_client.refresh_instance() + current_fw = self.sdk_client.get_ap_firmware_old_method(equipment_id=equipment_id) + latest_fw = self.get_fw_version() + print(self.model, current_fw, latest_fw) + if current_fw == latest_fw: + return False + else: + return True + + def is_fw_available(self, fw_version=None): + self.sdk_client.refresh_instance() + if fw_version is None: + exit() + try: + firmware_version = self.firmware_client.get_firmware_version_by_name( + firmware_version_name=fw_version) + firmware_version = firmware_version._id + print("Firmware ID: ", firmware_version) + except Exception as e: + print(e) + firmware_version = False + print("firmware not available: ", firmware_version) + return firmware_version + + +# This is for Unit tests on Controller Library +if __name__ == '__main__': + controller = { + 'url': "https://wlan-portal-svc-nola-ext-04.cicd.lab.wlan.tip.build", # API base url for the controller + 'username': 'support@example.com', + 'password': 'support', + 'version': "1.1.0-SNAPSHOT", + 'commit_date': "2021-04-27" + } + api = Controller(controller_data=controller) + profile = ProfileUtility(sdk_client=api) + profile_data = { + "name": "test-rf-wifi-6", + "is2dot4GHz": {}, + "is5GHz": {"channelBandwidth": "is20MHz"}, + "is5GHzL": {"channelBandwidth": "is20MHz"}, + "is5GHzU": {"channelBandwidth": "is20MHz"} + } + profile.set_rf_profile(profile_data=profile_data, mode="wifi6") + print(profile.default_profiles["rf"]) + # profile.cleanup_profiles() + + # profile.get_default_profiles() + # profile_data = { + # "profile_name": "ssid_wep_2g", + # "ssid_name": "ssid_wep_2g", + # "appliedRadios": ["is2dot4GHz"], + # "default_key_id" : 1, + # "wep_key" : 1234567890, + # "vlan": 1, + # "mode": "BRIDGE" + # } + # profile.create_wep_ssid_profile(profile_data=profile_data) + # print(profile.get_profile_by_name(profile_name="wpa_wpa2_eap")) + # profile.get_default_profiles() + api.disconnect_Controller() diff --git a/tests/e2e/interOp/Express_WiFi/__init__.py b/libs/tip_2x/README.md similarity index 100% rename from tests/e2e/interOp/Express_WiFi/__init__.py rename to libs/tip_2x/README.md diff --git a/libs/tip_2x/SetupLibrary.py b/libs/tip_2x/SetupLibrary.py new file mode 100644 index 000000000..c3b75ecef --- /dev/null +++ b/libs/tip_2x/SetupLibrary.py @@ -0,0 +1,81 @@ +import logging + +import paramiko +from scp import SCPClient + +logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) + + +class SetupLibrary: + + def __init__(self, remote_ip="", + remote_ssh_port=22, + remote_ssh_username="lanforge", + remote_ssh_password="lanforge", + pwd="", + ): + self.pwd = pwd + self.remote_ip = remote_ip + self.remote_ssh_username = remote_ssh_username + self.remote_ssh_password = remote_ssh_password + self.remote_ssh_port = remote_ssh_port + + def setup_serial_environment(self): + client = self.ssh_cli_connect() + cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read()) + if output.__contains__("False"): + cmd = 'mkdir ~/cicd-git/' + client.exec_command(cmd) + cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read()) + if output.__contains__("False"): + logging.info("Copying openwrt_ctl serial control Script...") + with SCPClient(client.get_transport()) as scp: + scp.put(self.pwd + 'openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py') # Copy my_file.txt to the server + cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"' + stdin, stdout, stderr = client.exec_command(cmd) + var = str(stdout.read()) + client.close() + + def ssh_cli_connect(self): + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + logging.info("Trying SSH Connection to: " + str(self.remote_ip) + + " on port: " + str(self.remote_ssh_port) + + " with username: " + str(self.remote_ssh_username) + + " and password: " + str(self.remote_ssh_password)) + client.connect(self.remote_ip, username=self.remote_ssh_username, password=self.remote_ssh_password, + port=self.remote_ssh_port, timeout=10, allow_agent=False, banner_timeout=200) + return client + + def check_serial_connection(self, tty="/dev/ttyUSB0"): + client = self.ssh_cli_connect() + cmd = 'ls /dev/tty*' + stdin, stdout, stderr = client.exec_command(cmd) + output = str(stdout.read().decode('utf-8')) + client.close() + available_tty_ports = output.split("\n") + if tty in available_tty_ports: + logging.info("Expected Serial Console Port, " + tty + " is available on " + self.remote_ip) + else: + logging.error("Expected Serial Console Port, " + tty + " is not available on " + self.remote_ip) + return tty in available_tty_ports + + def kill_all_minicom_process(self, tty="/dev/ttyUSB0"): + client = self.ssh_cli_connect() + stdin, stdout, stderr = client.exec_command("fuser -k " + tty) + # print(stdout.read()) + client.close() + + +if __name__ == '__main__': + obj = SetupLibrary(remote_ip="192.168.52.89", + remote_ssh_port=22, + pwd="") + + obj.setup_serial_environment() + obj.check_serial_connection(tty="/dev/ttyUSB0") + obj.kill_all_minicom_process(tty="/dev/ttyUSB0") diff --git a/tests/e2e/interOp/Express_WiFi/android/__init__.py b/libs/tip_2x/__init__.py similarity index 100% rename from tests/e2e/interOp/Express_WiFi/android/__init__.py rename to libs/tip_2x/__init__.py diff --git a/libs/tip_2x/ap_lib.py b/libs/tip_2x/ap_lib.py new file mode 100644 index 000000000..971ec464a --- /dev/null +++ b/libs/tip_2x/ap_lib.py @@ -0,0 +1,537 @@ +import importlib +import json +import logging +import random +import string +import time + +import allure +import paramiko +import pytest + +setup_lib = importlib.import_module("SetupLibrary") +SetupLibrary = setup_lib.SetupLibrary + + +class APLIBS: + setup_library_objects = list() + device_under_tests_data = None + + def __init__(self, dut_data=None): + if dut_data is None: + logging.error("Device Under Test Data is Not Specified, Please provide valid DUT Data") + pytest.exit("Device Under Test Data is Not Specified, Please provide valid DUT Data") + if type(dut_data) is not list: + logging.error("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format") + pytest.exit("Device Under Test Data is Not in list format, Please provide valid DUT Data in list format") + self.device_under_tests_data = dut_data + for dut in self.device_under_tests_data: + self.setup_library_objects.append(SetupLibrary(remote_ip=dut["host_ip"], + remote_ssh_port=dut["host_ssh_port"], + remote_ssh_username=dut["host_username"], + remote_ssh_password=dut["host_password"], + pwd="")) + + def ssh_cli_connect(self, ip="", + port=22, + username="", + password="", + timeout=10, + allow_agent=False, + banner_timeout=200): + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + client.connect(ip, username=username, password=password, + port=port, timeout=timeout, allow_agent=allow_agent, banner_timeout=banner_timeout) + return client + + def check_serial_connection(self, idx=0, print_log=True, attach_allure=True): + status = False + + if self.device_under_tests_data[idx]["method"] == "serial": + status = self.setup_library_objects[idx].check_serial_connection( + tty=self.device_under_tests_data[idx]["serial_tty"]) + if not status: + logging.error("Serial port not available. Exiting the Test") + pytest.exit("Serial port not available. Please check your serial port connection") + + def setup_serial_environment(self, idx=0): + status = [] + for dut in self.device_under_tests_data: + if dut["method"] == "serial": + status.append(self.setup_library_objects[idx].setup_serial_environment()) + if False in status: + logging.error("Serial port not available. Exiting the Test") + pytest.exit("Serial port not available. Please check your serial port connection") + self.exit_from_uboot(idx=idx) + self.reset_to_default(idx=idx) + + def get_dut_logs(self, idx=0, print_log=True, attach_allure=True): + output = self.run_generic_command(cmd="logread", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + return output + + def check_connectivity(self, idx=0, print_log=True, attach_allure=True): + maverick_status = self.run_generic_command(cmd="/etc/init.d/maverick status", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + if maverick_status.__contains__("running"): + logging.error("Maverick is running!!!") + # Maverick check is happening + # TODO: add the steps to diagnose the maverick reason, check certificates, wan ip address, + # check the partition for certificates and check the /certificates dir. Also check if any of the cert is + # missing, if anything is missing, then report that. if everything looks good, please check md5sum of certs + # also, try to do a reboot in case everything looks good and post reboot, check the maverick status. + # Jitendra + # pytest.exit("Maverick is running, Please check the wan connection and certificates") + check_iface = self.run_generic_command(cmd="ifconfig up0v0", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + if check_iface.__contains__("error fetching interface information: Device not found"): + logging.error(check_iface) + pytest.exit("up0v0 interface is not available!!!") + + output = self.run_generic_command(cmd="ip neigh show dev up0v0 REACHABLE", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + + if output.__contains__("INCOMPLETE") or output.__contains__("FAILED"): + logging.error(output) + pytest.fail("up0v0 interface is failed to have connectivity!!!") + + def get_uci_show(self, param="ucentral", idx=0, print_log=True, attach_allure=True): + output = self.run_generic_command(cmd="uci show " + param, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + + return output + + def restart_ucentral_service(self, idx=0, print_log=True, attach_allure=True): + output = self.run_generic_command(cmd="/etc/init.d/ucentral restart", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + + return output + + def ubus_call_ucentral_status(self, idx=0, print_log=True, attach_allure=True, retry=5): + ret_val = dict.fromkeys(["connected", "latest", "active"]) + for i in range(0, retry): + ret_val = dict.fromkeys(["connected", "latest", "active"]) + output = self.run_generic_command(cmd="ubus call ucentral status", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + + try: + data = dict(json.loads(output.replace("\n\t", "").replace("\n", ""))) + except Exception as e: + logging.error("error in converting the ubus call ucentral status output to json" + output) + data = {} + if (data.keys().__contains__("connected") or data.keys().__contains__("disconnected")) and \ + data.keys().__contains__("latest") and \ + data.keys().__contains__("active"): + break + else: + logging.error("Error in ubus call ucentral status: " + str(output)) + + if data.keys().__contains__("connected"): + ret_val["connected"] = True + if data.keys().__contains__("disconnected"): + ret_val["connected"] = False + if data.keys().__contains__("latest"): + ret_val["latest"] = data.get("latest") + if data.keys().__contains__("active"): + ret_val["active"] = data.get("active") + return ret_val + + def get_latest_config_recieved(self, idx=0, print_log=True, attach_allure=True): + r_val = self.ubus_call_ucentral_status(idx=idx) + latest_json = {} + if r_val["latest"] is None: + r_val = self.ubus_call_ucentral_status(idx=idx) + if r_val["latest"] is None: + logging.error("ubus call ucentral status has unexpected data") + return False + latest_uuid = r_val["latest"] + output = self.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid), idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + try: + data = dict(json.loads(output.replace("\n\t", "").replace("\n", ""))) + logging.info("Latest config is : " + str(data)) + allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid), + body=str(json.dumps(data, indent=2)), + attachment_type=allure.attachment_type.JSON) + except Exception as e: + data = output + logging.error("error in converting the output to json" + output) + try_again = True + allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(latest_uuid), + body=str(data), + attachment_type=allure.attachment_type.JSON) + + return latest_json + + def get_active_config(self, idx=0, print_log=True, attach_allure=False): + r_val = self.ubus_call_ucentral_status(idx=idx) + active_json = {} + if r_val["active"] is None: + r_val = self.ubus_call_ucentral_status(idx=idx) + if r_val["active"] is None: + logging.error("ubus call ucentral status has unexpected data") + return False + active_uuid = r_val["active"] + output = self.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(active_uuid), idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + try: + data = dict(json.loads(output.replace("\n\t", "").replace("\n", ""))) + logging.info("Active config is : " + str(data)) + allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(active_uuid), + body=str(json.dumps(data, indent=2)), + attachment_type=allure.attachment_type.JSON) + except Exception as e: + data = output + logging.error("error in converting the output to json" + output) + try_again = True + allure.attach(name="cat /etc/ucentral/ucentral.cfg." + str(active_uuid), + body=str(data), + attachment_type=allure.attachment_type.JSON) + print(data) + + return active_json + + def get_iwinfo(self, idx=0, print_log=True, attach_allure=True): + + # [['ssid_wpa2_2g', 'wpa', 'something', '2G'], ['ssid_wpa2_2g', 'wpa', 'something', '5G']] {'wlan0': [ + # '"ssid_wpa3_p_5g"', '12:34:56:78:90:12', '5G'], 'wlan1': ['"ssid_wpa3_p_2g"','00:03:7F:12:34:56', '5G']} + iwinfo_output = self.run_generic_command(cmd="iwinfo", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.TEXT) + + return iwinfo_output + + def get_bssid_band_mapping(self, idx=0): + data = self.get_iwinfo(idx=idx) + data = str(data).replace(" ", "").split("\n") + band_info = [] + for i in data: + tmp = [] + if i.__contains__("AccessPoint"): + bssid = i.replace("AccessPoint:", "") + tmp.append(bssid.casefold()) + elif i.__contains__("MasterChannel"): + if i.split(":")[2].__contains__("2.4"): + tmp.append("2G") + else: + tmp.append("5G") + else: + tmp = [] + if tmp != []: + band_info.append(tmp) + bssi_band_mapping = {} + for i in range(len(band_info)): + if (i % 2) == 0: + bssi_band_mapping[band_info[i][0]] = band_info[i + 1][0] + return bssi_band_mapping + + def get_ifconfig(self, idx=0): + pass + + def verify_certificates(self, idx=0, print_log=False, attach_allure=False): + cert_files_name = ["cas.pem", "dev-id", "key.pem", "cert.pem"] + for cert in cert_files_name: + output = self.run_generic_command(cmd='[ -f /etc/ucentral/' + cert + ' ] && echo "True" || echo "False"', + idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + if output == "False": + logging.error("Certificate " + cert + "is missing from /etc/ucentral/ directory. " + "Please add valid certificates on AP") + pytest.exit("Certificate " + cert + "is missing from /etc/ucentral/ directory. " + "Please add valid certificates on AP") + + def run_generic_command(self, cmd="", idx=0, print_log=True, attach_allure=False, + expected_attachment_type=allure.attachment_type.TEXT): + input_command = cmd + logging.info("Executing Command on AP: " + cmd) + try: + self.setup_library_objects[idx].kill_all_minicom_process( + tty=self.device_under_tests_data[idx]["serial_tty"]) + client = self.ssh_cli_connect(ip=self.device_under_tests_data[idx]["host_ip"], + port=self.device_under_tests_data[idx]["host_ssh_port"], + username=self.device_under_tests_data[idx]["host_username"], + password=self.device_under_tests_data[idx]["host_password"], + timeout=10, + allow_agent=False, + banner_timeout=200) + if self.device_under_tests_data[idx]["method"] == "serial": + owrt_args = "--prompt root@" + self.device_under_tests_data[idx][ + "identifier"] + " -s serial --log stdout --user root --passwd openwifi" + cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {owrt_args} -t {self.device_under_tests_data[idx]['serial_tty']} --action " \ + f"cmd --value \"{cmd}\" " + if print_log: + logging.info(cmd) + stdin, stdout, stderr = client.exec_command(cmd) + output = stdout.read() + final_output = str(output) + if not output.__contains__(b"BOOTLOADER-CONSOLE-IPQ6018#"): + status = output.decode('utf-8').splitlines() + status.pop(0) + final_output = '\n'.join(status) + if print_log: + logging.info(cmd) + logging.info("Output for command: " + input_command + "\n" + final_output) + if attach_allure: + allure.attach(name=input_command, body=output, attachment_type=expected_attachment_type) + client.close() + except Exception as e: + logging.error(e) + final_output = "Error: " + str(e) + return final_output + + def get_status(self, idx=0): + pass + + def exit_from_uboot(self, idx=0): + if self.is_console_uboot(): + self.run_generic_command(cmd="reset-from-console", idx=idx, + print_log=True, + attach_allure=True, + expected_attachment_type=allure.attachment_type.JSON) + + def is_console_uboot(self, idx=0): + output = self.run_generic_command(cmd="ubus call ucentral status", idx=idx, + print_log=True, + attach_allure=True, + expected_attachment_type=allure.attachment_type.JSON) + if output.__contains__("BOOTLOADER-CONSOLE-IPQ6018#"): + return True + else: + return False + + def is_autoreboot_running(self): + # TODO : Jitendra/Shivam + pass + + def reboot(self, idx=0): + output = self.run_generic_command(cmd="reboot", idx=idx, + print_log=False, + attach_allure=False, + expected_attachment_type=allure.attachment_type.JSON) + return output + + def get_active_firmware(self, idx=0): + pass + + def reset_to_default(self, idx=0): + self.run_generic_command(cmd="cd", idx=idx, + print_log=False, + attach_allure=False, + expected_attachment_type=allure.attachment_type.JSON) + + def get_wifi_status(self, idx=0, print_log=True, attach_allure=True): + output = self.run_generic_command(cmd="wifi status", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + + try_again = False + try: + data = dict(json.loads(output.replace("\n\t", "").replace("\n", ""))) + except Exception as e: + data = output + logging.error("error in converting the ubus call ucentral status output to json" + output) + try_again = True + if try_again or len(data.keys()) != 3: + output = self.run_generic_command(cmd="wifi status", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + try: + data = dict(json.loads(output.replace("\n\t", "").replace("\n", ""))) + except Exception as e: + data = output + logging.error("error in converting the ubus call ucentral status output to json" + output) + ret_val = data + return ret_val + + def get_ap_version(self, idx=0, print_log=True, attach_allure=False): + output = self.run_generic_command(cmd="cat /tmp/ucentral.version", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + return output + + def get_logread(self, start_ref="", stop_ref="", idx=0, print_log=False, attach_allure=False): + output = self.run_generic_command(cmd="logread", idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + log_data = [] + data = output.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 dfs(self, idx=0, print_log=True, attach_allure=False): + type_ = self.device_under_tests_data[idx]["mode"] + cmd = None + if type_.lower() == "wifi5": + cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' + output = self.run_generic_command(cmd=cmd1, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + + ret = output.split("\n") + status_count = int(ret.count("True")) + logging.info("Status count: " + str(status_count)) + if status_count == 1: + cmd = "cd && cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar" + else: + cmd = "cd && cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar" + elif type_.lower() == "wifi6" or type_.lower() == "wifi6e": + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' + output = self.run_generic_command(cmd=cmd, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + return output + + def dfs_logread(self, idx=0, print_log=True, attach_allure=False): + """get simulate radar command logs""" + type_ = self.device_under_tests_data[idx]["mode"] + if type_.lower() == "wifi5": + cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"' + output = self.run_generic_command(cmd=cmd1, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + logging.info("DFS logread output: " + str(output)) + if output.__contains__("False"): + cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && logread | grep DFS" + else: + cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" + # cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" + # print("cmd: ", cmd) + elif type_.lower() == "wifi6" or type_.lower() == "wifi6e": + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS' + try: + output = self.run_generic_command(cmd=cmd, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + ret = output.split("\n") + logread = ret[-6:] + logs = "" + for i in logread: + logs = logs + i + "\n" + except Exception as e: + print(e) + logs = "" + logging.info("Simulate radar logs: " + str(logs)) + return logs + + +if __name__ == '__main__': + basic= { + "target": "tip_2x", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth3", + "lan_port": None, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36c4301", + "method": "serial", + "host_ip": "192.168.52.89", + "host_username": "lanforge", + "host_password": "lanforge", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyUSB0", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "192.168.52.89", + "http_port": 8080, + "ssh_port": 22, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth3": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth2": { + "addressing": "static", + "ip": "192.168.52.150", + "gateway_ip": "192.168.52.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.NOTSET) + obj = APLIBS(dut_data=basic["device_under_tests"]) + obj.ubus_call_ucentral_status() + # obj.exit_from_uboot() + # obj.setup_serial_environment() + + # obj.verify_certificates() + # obj.get_dut_logs() + # l = obj.get_latest_config_recieved() + # a = obj.get_active_config() + # if a == l: + # print("a = l") + # print(obj.get_ap_version()) diff --git a/libs/tip_2x/controller.py b/libs/tip_2x/controller.py new file mode 100644 index 000000000..7117224d3 --- /dev/null +++ b/libs/tip_2x/controller.py @@ -0,0 +1,2021 @@ +""" + + Base Library for Ucentral + +""" +import datetime +import json +import logging +import sys +import time +from operator import itemgetter +from urllib.parse import urlparse + +import allure +import pytest +import requests + + +# logging.basicConfig(level=logging.DEBUG) +# from http.client import HTTPConnection +# +# HTTPConnection.debuglevel = 1 +# requests.logging.getLogger() + + +class ConfigureController: + + def __init__(self, controller_data): + self.username = controller_data["username"] + self.password = controller_data["password"] + self.host = urlparse(controller_data["url"]) + self.access_token = "" + # self.session = requests.Session() + self.login_resp = self.login() + self.gw_host, self.fms_host, \ + self.prov_host, self.owrrm_host, \ + self.owanalytics_host, self.owsub_host = self.get_gw_endpoint() + if self.gw_host == "" or self.fms_host == "" or self.prov_host == "": + time.sleep(60) + self.gw_host, self.fms_host, \ + self.prov_host, self.owrrm_host, \ + self.owanalytics_host, self.owsub_host = self.get_gw_endpoint() + if self.gw_host == "" or self.fms_host == "" or self.prov_host == "": + self.logout() + logging.info(self.gw_host, self.fms_host + self.prov_host) + pytest.exit("All Endpoints not available in Controller Service") + sys.exit() + + def build_uri_sec(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.host.hostname, self.host.port, path) + return new_uri + + def build_url_fms(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.fms_host.hostname, self.fms_host.port, path) + return new_uri + + def build_uri(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.gw_host.hostname, self.gw_host.port, path) + return new_uri + + def build_url_prov(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.prov_host.hostname, self.prov_host.port, path) + return new_uri + + def build_url_owrrm(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.owrrm_host.hostname, self.owrrm_host.port, path) + return new_uri + + def build_url_owanalytics(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.owanalytics_host.hostname, self.owanalytics_host.port, path) + return new_uri + + def build_url_owsub(self, path): + new_uri = 'https://%s:%d/api/v1/%s' % (self.owsub_host.hostname, self.owsub_host.port, path) + return new_uri + + def request(self, service, command, method, params, payload): + if service == "sec": + uri = self.build_uri_sec(command) + elif service == "gw": + uri = self.build_uri(command) + elif service == "fms": + uri = self.build_url_fms(command) + elif service == "prov": + uri = self.build_url_prov(command) + elif service == "rrm": + uri = self.build_url_owrrm(command) + elif service == "analytics": + uri = self.build_url_owanalytics(command) + elif service == "sub": + uri = self.build_url_owsub(command) + else: + raise NameError("Invalid service code for request.") + params = params + if method == "GET": + resp = requests.get(uri, headers=self.make_headers(), params=params, verify=False, timeout=100) + elif method == "POST": + resp = requests.post(uri, params=params, data=payload, headers=self.make_headers(), verify=False, + timeout=100) + elif method == "PUT": + resp = requests.put(uri, params=params, data=payload, verify=False, timeout=100) + elif method == "DELETE": + resp = requests.delete(uri, headers=self.make_headers(), params=params, verify=False, timeout=100) + + self.check_response(method, resp, self.make_headers(), payload, uri) + + return resp + + def login(self): + uri = self.build_uri_sec("oauth2") + # self.session.mount(uri, HTTPAdapter(max_retries=15)) + payload = json.dumps({"userId": self.username, "password": self.password}) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, "", payload, uri) + token = resp + self.access_token = token.json()['access_token'] + resp.close() + if resp.status_code != 200: + pytest.exit(str(resp.json())) + # self.session.headers.update({'Authorization': self.access_token}) + return token + + def get_gw_endpoint(self): + uri = self.build_uri_sec("systemEndpoints") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + services = resp.json() + gw_host = None + fms_host = None + prov_host = None + owrrm_host = None + owanalytics_host = None + owsub_host = None + for service in services['endpoints']: + if service['type'] == "owgw": + gw_host = urlparse(service["uri"]) + if service['type'] == "owfms": + fms_host = urlparse(service["uri"]) + if service['type'] == "owprov": + prov_host = urlparse(service["uri"]) + if service['type'] == "owrrm": + owrrm_host = urlparse(service["uri"]) + if service['type'] == "owanalytics": + owanalytics_host = urlparse(service["uri"]) + if service['type'] == "owsub": + owsub_host = urlparse(service["uri"]) + if (gw_host is None) or (fms_host is None) or (prov_host is None) or (owrrm_host is None) or ( + owanalytics_host is None) or ( + owsub_host is None): + logging.error("Not All Microservices available:" + str( + json.dumps(services['endpoints'], indent=2))) + return gw_host, fms_host, prov_host, owrrm_host, owanalytics_host, owsub_host + + def logout(self): + uri = self.build_uri_sec('oauth2/%s' % self.access_token) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.delete(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("DELETE", resp, self.make_headers(), "", uri) + r = resp + resp.close() + return r + + def make_headers(self): + headers = {'Authorization': 'Bearer %s' % self.access_token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "Keep-Alive": "timeout=10, max=1000" + } + return headers + + def check_response(self, cmd, response, headers, data_str, url=""): + try: + logging.info("Command Response: " + "\n" + + "Command Type: " + str(cmd) + "\n" + + "Response URI: " + str(url) + "\n" + + "Response Headers: " + str(headers) + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "Response Code: " + str(response.status_code) + "\n" + + "Response Body: " + str(response.json())) + allure.attach(name="Command Response: ", body="Command Response: " + "\n" + + "Command Type: " + str(cmd) + "\n" + + "Response URI: " + str(url) + "\n" + + "Response Headers: " + str(headers) + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "Response Code: " + str(response.status_code) + "\n" + + "Response Body: " + str(response.json())) + except: + pass + return True + + +class Controller(ConfigureController): + + def __init__(self, controller_data=None): + super().__init__(controller_data) + + def get_devices(self): + uri = self.build_uri("devices") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_by_serial_number(self, serial_number): + uri = self.build_uri("device/" + serial_number) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_sdk_version_gw(self): + uri = self.build_uri("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_fms(self): + uri = self.build_url_fms("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_prov(self): + uri = self.build_url_prov("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_owrrm(self): + uri = self.build_url_owrrm("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_ow_analytics(self): + uri = self.build_url_owanalytics("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_owsub(self): + uri = self.build_url_owsub("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_sdk_version_sec(self): + uri = self.build_uri_sec("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + version = resp.json() + return version['version'] + + def get_system_gw(self): + uri = self.build_uri("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_system_fms(self): + uri = self.build_url_fms("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_system_prov(self): + uri = self.build_url_prov("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_system_ow_rrm(self): + uri = self.build_url_owrrm("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_system_ow_analytics(self): + uri = self.build_url_owanalytics("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_system_ow_sub(self): + uri = self.build_url_owsub("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_uuid(self, serial_number): + device_info = self.get_device_by_serial_number(serial_number=serial_number) + device_info = device_info.json() + return device_info["UUID"] + + def add_device_to_gw(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def delete_device_from_gw(self, device_name): + uri = self.build_uri("device/" + device_name) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.delete(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("DELETE", resp, self.make_headers(), "", uri) + return resp + + def get_commands(self, serial_number): + uri = self.build_uri("commands?serialNumber=" + serial_number) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_logs(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/logs") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_health_checks(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/healthchecks") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_capabilities(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/capabilities") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_statistics(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/statistics") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def get_device_status(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/status") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def ap_reboot(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/reboot") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def ap_factory_reset(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/factory") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def ping_device(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/ping") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def led_blink_device(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/leds") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def trace_device(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/trace") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def wifi_scan_device(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/wifiscan") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def request_specific_msg_from_device(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/request") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def event_queue(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/eventqueue") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def telemetry(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number + "/telemetry") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.post(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("POST", resp, self.make_headers(), payload, uri) + return resp + + def get_rtty_params(self, serial_number): + uri = self.build_uri("device/" + serial_number + "/rtty") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100) + self.check_response("GET", resp, self.make_headers(), "", uri) + return resp + + def edit_device_on_gw(self, serial_number, payload): + uri = self.build_uri("device/" + serial_number) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.make_headers())) + resp = requests.put(uri, data=payload, headers=self.make_headers(), verify=False, timeout=100) + + self.check_response("PUT", resp, self.make_headers(), payload, uri) + return resp + + +class FMSUtils: + + def __init__(self, sdk_client=None, controller_data=None): + if sdk_client is None: + self.sdk_client = Controller(controller_data=controller_data) + self.sdk_client = sdk_client + + def upgrade_firmware(self, serial="", url=""): + payload = "{ \"serialNumber\" : " + "\"" + \ + serial + "\"" + " , \"uri\" : " \ + + "\"" + url \ + + "\"" + ", \"when\" : 0" \ + + " }" + command = "device/" + serial + "/upgrade" + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(command) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(command) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + response = self.sdk_client.request(service="gw", command="device/" + serial + "/upgrade", + method="POST", params="serialNumber=" + serial, + payload="{ \"serialNumber\" : " + "\"" + serial + "\"" + + " , \"uri\" : " + "\"" + url + "\"" + + ", \"when\" : 0" + " }") + + def ap_model_lookup(self, model=""): + devices = self.get_device_set() + model_name = "" + for device in devices['deviceTypes']: + if str(device).__eq__(model): + model_name = device + return model_name + + def get_revisions(self): + response = self.sdk_client.request(service="fms", command="firmwares", method="GET", params="revisionSet=true", + payload="") + if response.status_code == 200: + return response.json() + else: + return {} + + def get_latest_fw(self, model=""): + + device_type = self.ap_model_lookup(model=model) + + response = self.sdk_client.request(service="fms", command="firmwares", method="GET", + params="latestOnly=true&deviceType=" + device_type, + payload="") + if response.status_code == 200: + return response.json() + else: + return {} + + def get_device_set(self): + response = self.sdk_client.request(service="fms", command="firmwares", method="GET", params="deviceSet=true", + payload="") + if response.status_code == 200: + return response.json() + else: + return {} + + def get_firmwares(self, limit="10000", model="", latestonly="", branch="", commit_id="", offset="3000"): + + deviceType = self.ap_model_lookup(model=model) + params = "limit=" + limit + \ + "&deviceType=" + deviceType + \ + "&latestonly=" + latestonly + \ + "offset=" + offset + command = "firmwares" + response = self.sdk_client.request(service="fms", command=command, method="GET", params=params, payload="") + allure.attach(name=command + params, + body=str(response.status_code) + "\n" + str(response.json()), + attachment_type=allure.attachment_type.JSON) + if response.status_code == 200: + data = response.json() + newlist = sorted(data['firmwares'], key=itemgetter('created')) + + return newlist + + return "error" + + +class ProvUtils: + + def __init__(self, sdk_client=None, controller_data=None): + if sdk_client is None: + self.sdk_client = Controller(controller_data=controller_data) + self.sdk_client = sdk_client + + def get_inventory(self): + uri = self.sdk_client.build_url_prov("inventory") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_inventory_by_device(self, device_name): + uri = self.sdk_client.build_url_prov("inventory/" + device_name) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_system_prov(self): + uri = self.sdk_client.build_url_prov("system?command=info") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_device_to_inventory(self, device_name, payload): + uri = self.sdk_client.build_url_prov("inventory/" + device_name) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_device_from_inventory(self, device_name): + uri = self.sdk_client.build_url_prov("inventory/" + device_name) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_entity(self): + uri = self.sdk_client.build_url_prov("entity") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_entity_by_id(self, entity_id): + uri = self.sdk_client.build_url_prov("entity/" + entity_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_entity(self, payload): + uri = self.sdk_client.build_url_prov("entity/1") + + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_entity(self, entity_id): + uri = self.sdk_client.build_url_prov("entity/" + entity_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_device_from_inventory(self, device_name, payload): + uri = self.sdk_client.build_url_prov("inventory/" + device_name) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def edit_entity(self, payload, entity_id): + uri = self.sdk_client.build_url_prov("entity/" + entity_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_contact(self): + uri = self.sdk_client.build_url_prov("contact") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_contact_by_id(self, contact_id): + uri = self.sdk_client.build_url_prov("contact/" + contact_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_contact(self, payload): + uri = self.sdk_client.build_url_prov("contact/1") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_contact(self, contact_id): + uri = self.sdk_client.build_url_prov("contact/" + contact_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_contact(self, payload, contact_id): + uri = self.sdk_client.build_url_prov("contact/" + contact_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_location(self): + uri = self.sdk_client.build_url_prov("location") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_location_by_id(self, location_id): + uri = self.sdk_client.build_url_prov("location/" + location_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_location(self, payload): + uri = self.sdk_client.build_url_prov("location/1") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_location(self, location_id): + uri = self.sdk_client.build_url_prov("location/" + location_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_location(self, payload, location_id): + uri = self.sdk_client.build_url_prov("location/" + location_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_venue(self): + uri = self.sdk_client.build_url_prov("venue") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_venue_by_id(self, venue_id): + uri = self.sdk_client.build_url_prov("venue/" + venue_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_venue(self, payload): + uri = self.sdk_client.build_url_prov("venue/0") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_venue(self, venue_id): + uri = self.sdk_client.build_url_prov("venue/" + venue_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_venue(self, payload, venue_id): + uri = self.sdk_client.build_url_prov("venue/" + venue_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_map(self): + uri = self.sdk_client.build_url_prov("map") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_map_by_id(self, map_id): + uri = self.sdk_client.build_url_prov("map/" + map_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_map(self, payload): + uri = self.sdk_client.build_url_prov("map/0") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_map(self, map_id): + uri = self.sdk_client.build_url_prov("map/" + map_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_map(self, payload, map_id): + uri = self.sdk_client.build_url_prov("map/" + map_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_operator(self): + uri = self.sdk_client.build_url_prov("operator") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_operator_by_id(self, operator_id): + uri = self.sdk_client.build_url_prov("operator/" + operator_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_operator(self, payload): + uri = self.sdk_client.build_url_prov("operator/1") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_operator(self, operator_id): + uri = self.sdk_client.build_url_prov("operator/" + operator_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_operator(self, payload, operator_id): + uri = self.sdk_client.build_url_prov("operator/" + operator_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_service_class_by_operator_id(self, operator_id): + uri = self.sdk_client.build_url_prov("serviceClass?operatorId=" + operator_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_service_class_by_id(self, service_class_id): + uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_service_class(self, payload): + uri = self.sdk_client.build_url_prov("serviceClass/1") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_service_class(self, service_class_id): + uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_service_class(self, payload, service_class_id): + uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def get_configuration(self): + uri = self.sdk_client.build_url_prov("configuration") + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def get_configuration_by_id(self, configuration_id): + uri = self.sdk_client.build_url_prov("configuration/" + configuration_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def add_configuration(self, payload): + uri = self.sdk_client.build_url_prov("configuration/1") + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + def delete_configuration(self, configuration_id): + uri = self.sdk_client.build_url_prov("configuration/" + configuration_id) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri) + return resp + + def edit_configuration(self, payload, configuration_id): + uri = self.sdk_client.build_url_prov("configuration/" + configuration_id) + payload = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100) + self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri) + return resp + + +class UProfileUtility: + + def __init__(self, sdk_client=None, controller_data=None): + if sdk_client is None: + self.sdk_client = Controller(controller_data=controller_data) + self.sdk_client = sdk_client + self.base_profile_config = { + "uuid": 1, + "radios": [], + "interfaces": [{ + "name": "WAN", + "role": "upstream", + "services": ["ssh", "lldp", "dhcp-snooping"], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": ["ssh", "lldp", "dhcp-snooping"], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/16", + "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + }, + }], + "metrics": { + "statistics": { + "interval": 60, + "types": ["ssids", "lldp", "clients"] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": ["probe", + "auth", + "assoc", + "disassoc", + "deauth", + "local-deauth", + "inactive-deauth", + "key-mismatch", + "beacon-report", + "radar-detected"] + }, + "dhcp-snooping": { + "filters": ["ack", "discover", "offer", "request", "solicit", "reply", "renew"] + } + }, + "services": { + "lldp": { + "describe": "TIP OpenWiFi", + "location": "QA" + }, + "ssh": { + "port": 22 + } + } + } + self.vlan_section = { + "name": "WAN100", + "role": "upstream", + "vlan": { + "id": 100 + }, + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + } + self.mode = None + + def set_mesh_services(self): + self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.97.1/24" + self.base_profile_config["interfaces"][1]["ipv4"]["dhcp"]["lease-count"] = 100 + del self.base_profile_config['metrics']['wifi-frames'] + del self.base_profile_config['metrics']['dhcp-snooping'] + var = { + "filters": ["probe", + "auth"] + } + self.base_profile_config["metrics"]['wifi-frames'] = var + del self.base_profile_config['services'] + var2 = { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } + self.base_profile_config['services'] = var2 + + def set_express_wifi(self, open_flow=None): + if self.mode == "NAT": + self.base_profile_config["interfaces"][1]["services"] = ["ssh", "lldp", "open-flow"] + self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.97.1/24" + self.base_profile_config["interfaces"][1]["ipv4"]["dhcp"]["lease-count"] = 100 + self.base_profile_config['services']["open-flow"] = open_flow + self.base_profile_config['services']['lldp']['describe'] = "OpenWiFi - expressWiFi" + self.base_profile_config['services']['lldp']['location'] = "Hotspot" + + def set_captive_portal(self): + + if self.mode == "NAT": + max_client = { + "max-clients": 32 + } + # sourceFile = open('captive_config.py', 'w') + + self.base_profile_config["interfaces"][1]["name"] = "captive" + self.base_profile_config["interfaces"][1]["ipv4"]["subnet"] = "192.168.2.1/24" + self.base_profile_config["interfaces"][1]["captive"] = max_client + del self.base_profile_config["interfaces"][1]["ethernet"] + del self.base_profile_config["interfaces"][1]["services"] + del self.base_profile_config["metrics"]["wifi-frames"] + del self.base_profile_config["metrics"]["dhcp-snooping"] + + def encryption_lookup(self, encryption="psk"): + encryption_mapping = { + "none": "open", + "psk": "wpa", + "psk2": "wpa2", + "sae": "wpa3", + "psk-mixed": "wpa|wpa2", + "sae-mixed": "wpa3", + "wpa": 'wap', + "wpa2": "eap", + "wpa3": "eap", + "wpa-mixed": "eap", + "wpa3-mixed": "sae" + } + if encryption in encryption_mapping.keys(): + return encryption_mapping[encryption] + else: + return False + + def get_ssid_info(self): + ssid_info = [] + for interfaces in self.base_profile_config["interfaces"]: + if "ssids" in interfaces.keys(): + for ssid_data in interfaces["ssids"]: + for band in ssid_data["wifi-bands"]: + temp = [ssid_data["name"]] + if ssid_data["encryption"]["proto"] == "none" or "radius" in ssid_data.keys(): + temp.append(self.encryption_lookup(encryption=ssid_data["encryption"]["proto"])) + temp.append('[BLANK]') + else: + temp.append(self.encryption_lookup(encryption=ssid_data["encryption"]["proto"])) + temp.append(ssid_data["encryption"]["key"]) + temp.append(band) + ssid_info.append(temp) + return ssid_info + + def set_radio_config(self, radio_config={}, open_roaming=False): + if open_roaming: + base_radio_config_2g = { + "band": "2G", + "country": "CA", + "channel-mode": "HT", + "channel-width": 20, + "channel": "auto" + } + base_radio_config_5g = { + "band": "5G", + "country": "CA", + "channel-mode": "VHT", + "channel-width": 80, + "channel": "auto" + } + + for band in radio_config: + if band == "2G" and radio_config[band] is not None: + for keys in radio_config[band]: + base_radio_config_2g[keys] = radio_config[band][keys] + if band == "5G" and radio_config[band] is not None: + for keys in radio_config[band]: + base_radio_config_5g[keys] = radio_config[band][keys] + self.base_profile_config["radios"].append(base_radio_config_2g) + self.base_profile_config["radios"].append(base_radio_config_5g) + else: + base_radio_config_2g = { + "band": "2G", + "country": "US", + "channel-mode": "HE", + "channel": "auto" + } + base_radio_config_5g = { + "band": "5G", + "country": "US", + "allow-dfs": True, + "channel-mode": "HE", + "channel": "auto" + } + base_radio_config_6g = { + "band": "6G", + "country": "US", + "channel-mode": "HE", + "channel": "auto" + } + for band in radio_config: + if band == "2G" and radio_config[band] is not None: + for keys in radio_config[band]: + base_radio_config_2g[keys] = radio_config[band][keys] + if band == "5G" and radio_config[band] is not None: + for keys in radio_config[band]: + base_radio_config_5g[keys] = radio_config[band][keys] + if band == "6G" and radio_config[band] is not None: + for keys in radio_config[band]: + base_radio_config_6g[keys] = radio_config[band][keys] + + self.base_profile_config["radios"].append(base_radio_config_2g) + self.base_profile_config["radios"].append(base_radio_config_5g) + self.base_profile_config["radios"].append(base_radio_config_6g) + self.vlan_section["ssids"] = [] + self.vlan_ids = [] + + def set_mode(self, mode, mesh=False, open_roaming=False): + self.mode = mode + if mode == "NAT": + if mesh: + self.base_profile_config['interfaces'][0]['tunnel'] = { + "proto": "mesh" + } + elif open_roaming: + self.base_profile_config['metrics']['statistics']['interval'] = 120 + self.base_profile_config['interfaces'][1]['ipv4']['subnet'] = "192.168.1.1/24" + self.base_profile_config['interfaces'][1]['ipv4']['dhcp']['lease-count'] = 100 + del self.base_profile_config['metrics']['dhcp-snooping'] + self.base_profile_config['interfaces'][1]['ssids'] = [] + elif mode == "BRIDGE": + if mesh: + self.base_profile_config['interfaces'][0]['tunnel'] = { + "proto": "mesh" + } + elif open_roaming: + self.base_profile_config['metrics']['statistics']['interval'] = 120 + self.base_profile_config['interfaces'][1]['ipv4']['subnet'] = "192.168.1.1/24" + self.base_profile_config['interfaces'][1]['ipv4']['dhcp']['lease-count'] = 100 + del self.base_profile_config['interfaces'][0]['services'] + del self.base_profile_config['metrics']['wifi-frames'] + del self.base_profile_config['metrics']['dhcp-snooping'] + del self.base_profile_config['services']['lldp'] + self.base_profile_config['interfaces'][0]['ssids'] = [] + elif mode == "VLAN": + if mesh: + self.base_profile_config['interfaces'][0]['tunnel'] = { + "proto": "mesh" + } + del self.base_profile_config['interfaces'][1] + self.base_profile_config['interfaces'][0]['ssids'] = [] + self.base_profile_config['interfaces'] = [] + wan_section_vlan = { + "name": "WAN", + "role": "upstream", + "services": ["lldp", "ssh", "dhcp-snooping"], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + } + self.base_profile_config['interfaces'].append(wan_section_vlan) + else: + logging.error("Invalid Mode") + return 0 + + def add_ssid(self, ssid_data, radius=False, radius_auth_data={}, radius_accounting_data={}, pass_point_data=None, + open_roaming=False): + open_ssid = { + "name": "To_Download_profile", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "none", + "ieee80211w": "optional" + } + } + if open_roaming: + ssid_info = {'name': ssid_data["ssid_name"], "bss-mode": "ap", "wifi-bands": []} + for options in ssid_data: + if options == "multi-psk": + ssid_info[options] = ssid_data[options] + if options == "rate-limit": + ssid_info[options] = ssid_data[options] + if options == "isolate-clients": + ssid_info[options] = ssid_data[options] + for i in ssid_data["appliedRadios"]: + ssid_info["wifi-bands"].append(i) + ssid_info['encryption'] = {} + ssid_info['encryption']['proto'] = ssid_data["security"] + try: + ssid_info['encryption']['key'] = ssid_data["security_key"] + except Exception as e: + pass + ssid_info['encryption']['ieee80211w'] = "optional" + if radius: + ssid_info["radius"] = {} + ssid_info["radius"]["authentication"] = { + "nas-identifier": radius_auth_data["nas-identifier"], + "chargeable-user-id": radius_auth_data["chargeable-user-id"], + "host": radius_auth_data["ip"], + "port": radius_auth_data["port"], + "secret": radius_auth_data["secret"], + "request-attribute": radius_auth_data["request-attribute"], + } + ssid_info["radius"]["accounting"] = { + "host": radius_accounting_data["ip"], + "port": radius_accounting_data["port"], + "secret": radius_accounting_data["secret"], + "request-attribute": radius_accounting_data["request-attribute"], + "interval": radius_accounting_data["interval"] + } + ssid_info["pass-point"] = pass_point_data + + else: + ssid_info = {'name': ssid_data["ssid_name"], "bss-mode": "ap", "wifi-bands": [], "services": ["wifi-frames"]} + for options in ssid_data: + if options == "multi-psk": + ssid_info[options] = ssid_data[options] + if options == "rate-limit": + ssid_info[options] = ssid_data[options] + if options == "isolate-clients": + ssid_info[options] = ssid_data[options] + for i in ssid_data["appliedRadios"]: + ssid_info["wifi-bands"].append(i) + ssid_info['encryption'] = {} + ssid_info['encryption']['proto'] = ssid_data["security"] + try: + ssid_info['encryption']['key'] = ssid_data["security_key"] + except Exception as e: + pass + ssid_info['encryption']['ieee80211w'] = "optional" + if radius: + ssid_info["radius"] = {} + ssid_info["radius"]["authentication"] = { + "host": radius_auth_data["ip"], + "port": radius_auth_data["port"], + "secret": radius_auth_data["secret"] + } + ssid_info["radius"]["accounting"] = { + "host": radius_accounting_data["ip"], + "port": radius_accounting_data["port"], + "secret": radius_accounting_data["secret"] + } + if self.mode == "NAT": + self.base_profile_config['interfaces'][1]['ssids'].append(ssid_info) + if open_roaming is True: + self.base_profile_config['interfaces'][1]['ssids'].append(open_ssid) + elif self.mode == "BRIDGE": + self.base_profile_config['interfaces'][0]['ssids'].append(ssid_info) + if open_roaming is True: + self.base_profile_config['interfaces'][0]['ssids'].append(open_ssid) + elif self.mode == "VLAN": + vid = ssid_data["vlan"] + self.vlan_section = { + "name": "WAN100", + "role": "upstream", + "services": ["lldp", "dhcp-snooping"], + "vlan": { + "id": 100 + }, + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + } + vlan_section = self.vlan_section + if vid in self.vlan_ids: + for i in self.base_profile_config['interfaces']: + if i["name"] == "WANv%s" % (vid): + i["ssids"].append(ssid_info) + else: + self.vlan_ids.append(vid) + vlan_section['name'] = "WANv%s" % (vid) + vlan_section['vlan']['id'] = int(vid) + vlan_section["ssids"] = [] + vlan_section["ssids"].append(ssid_info) + self.base_profile_config['interfaces'].append(vlan_section) + + vsection = 0 + else: + logging.error("invalid Operating Mode") + pytest.exit("invalid Operating Mode") + + def push_config(self, serial_number): + payload = {"configuration": self.base_profile_config, "serialNumber": serial_number, "UUID": 1} + uri = self.sdk_client.build_uri("device/" + serial_number + "/configure") + basic_cfg_str = json.dumps(payload) + logging.info("Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(json.dumps(payload, indent=2)) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + allure.attach(name="Sending Command:", body="Sending Command: " + "\n" + + "TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" + + "URI: " + str(uri) + "\n" + + "Data: " + str(payload) + "\n" + + "Headers: " + str(self.sdk_client.make_headers())) + + resp = requests.post(uri, data=basic_cfg_str, headers=self.sdk_client.make_headers(), + verify=False, timeout=100) + self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), basic_cfg_str, uri) + resp.close() + return resp + + +if __name__ == '__main__': + controller = { + 'url': 'https://sec-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller + 'username': "tip@ucentral.com", + 'password': 'OpenWifi%123', + } + obj = Controller(controller_data=controller) + # po = ProvUtils(sdk_client=obj) + # print(po.get_inventory()) + # up = UProfileUtility(sdk_client=obj, controller_data=controller) + # up.set_mode(mode="BRIDGE") + # up.set_radio_config() + # up.add_ssid(ssid_data={"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"}) + # up.push_config(serial_number="3c2c99f44e77") + # print(obj.get_device_by_serial_number(serial_number="3c2c99f44e77")) + # print(datetime.datetime.utcnow()) + # fms = FMSUtils(sdk_client=obj) + # new = fms.get_firmwares(model='ecw5410') + # for i in new: + # print(i) + # print(len(new)) + + # print(profile.get_ssid_info()) + # # print(obj.get_devices()) + obj.logout() diff --git a/libs/tip_2x/openwrt_ctl.py b/libs/tip_2x/openwrt_ctl.py new file mode 100755 index 000000000..c793c0ba8 --- /dev/null +++ b/libs/tip_2x/openwrt_ctl.py @@ -0,0 +1,388 @@ +#!/usr/bin/python3 +''' + +make sure pexpect is installed: +$ sudo yum install python3-pexpect + +You might need to install pexpect-serial using pip: +$ pip3 install serial +$ pip3 install pexpect-serial + +./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0 + +# Set up reverse ssh tunnel +./openwrt_ctl.py --tty /dev/ttyAP1 --action ssh-tunnel \ + --value "ssh -y -y -f -N -T -M -R 9999:localhost:22 lanforge@10.28.3.100" \ + --value2 password-for-10.28.3.100 --log stdout --scheme serial --prompt root@Open +''' + +import sys + +if sys.version_info[0] != 3: + print("This script requires Python 3") + exit() + +try: + import importlib + re = importlib.import_module("re") + logging = importlib.import_module("logging") + time = importlib.import_module("time") + sleep = time.sleep + pexpect = importlib.import_module("pexpect") + serial = importlib.import_module("serial") + pexpect_serial = importlib.import_module("pexpect_serial") + SerialSpawn = pexpect_serial.SerialSpawn + pprint = importlib.import_module("pprint") + telnetlib = importlib.import_module("telnetlib") + argparse = importlib.import_module("argparse") +except ImportError as e: + logging.error(e) + sys.exit("Python Import Error: " + str(e)) + +default_host = "localhost" +default_ports = { + "serial": None, + "ssh": 22, + "telnet": 23 +} +NL = "\n" +CR = "\r\n" +Q = '"' +A = "'" +FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s' +prompt = "root@OpenWrt:" + + +def usage(): + print("$0 used connect to OpenWrt AP or similar Linux machine:") + print("-d|--dest IP address of the OpenWrt AP, for ssh/telnet scheme") + print("-o|--port IP port of the OpenWrt AP, for ssh/telnet scheme") + print("-t|--tty Serial port, if using serial scheme") + print("-u|--user login name") + print("-p|--pass password") + print("--prompt Prompt to look for when commands are done (default: root@OpenWrt)") + print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") + print("-l|--log file log messages here") + print("--action (logread | journalctl | lurk | sysupgrade | download | upload | reboot | cmd | ssh-tunnel") + print("--value (option to help complete the action") + print("--value2 (option to help complete the action, dest filename for download, passwd for ssh-tunnel") + print("-h|--help") + + +# see https://stackoverflow.com/a/13306095/11014343 +class FileAdapter(object): + def __init__(self, logger): + self.logger = logger + + def write(self, data): + # NOTE: data can be a partial line, multiple lines + data = data.strip() # ignore leading/trailing whitespace + if data: # non-blank + self.logger.info(data) + + def flush(self): + pass # leave it to logging to flush properly + + +def main(): + global prompt + + parser = argparse.ArgumentParser(description="OpenWrt AP Control Script") + parser.add_argument("-d", "--dest", type=str, help="address of the cisco controller_tests") + parser.add_argument("-o", "--port", type=int, help="control port on the controller_tests") + parser.add_argument("-u", "--user", type=str, help="credential login/username") + parser.add_argument("-p", "--passwd", type=str, help="credential password") + parser.add_argument("-P", "--prompt", type=str, help="Prompt to look for") + parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"], + help="Connect via serial, ssh or telnet") + parser.add_argument("-t", "--tty", type=str, help="tty serial device") + parser.add_argument("-l", "--log", type=str, help="logfile for messages, stdout means output to console") + parser.add_argument("--action", type=str, help="perform action", + choices=["logread", "journalctl", "lurk", "sysupgrade", "sysupgrade-n", "download", "upload", + "reboot", "cmd", "ssh-tunnel"]) + parser.add_argument("--value", type=str, help="set value") + parser.add_argument("--value2", type=str, help="set value2") + tty = None + + args = None + try: + args = parser.parse_args() + host = args.dest + scheme = args.scheme + port = args.port + # port = (default_ports[scheme], args.port)[args.port != None] + user = args.user + passwd = args.passwd + logfile = args.log + tty = args.tty; + if (args.prompt != None): + prompt = args.prompt + filehandler = None + except Exception as e: + logging.exception(e); + usage() + exit(2); + + console_handler = logging.StreamHandler() + formatter = logging.Formatter(FORMAT) + logg = logging.getLogger(__name__) + logg.setLevel(logging.DEBUG) + file_handler = None + if (logfile is not None): + if (logfile != "stdout"): + file_handler = logging.FileHandler(logfile, "w") + file_handler.setLevel(logging.DEBUG) + file_handler.setFormatter(formatter) + logg.addHandler(file_handler) + logging.basicConfig(format=FORMAT, handlers=[file_handler]) + else: + # stdout logging + logging.basicConfig(format=FORMAT, handlers=[console_handler]) + + CCPROMPT = prompt + + ser = None + egg = None # think "eggpect" + try: + if (scheme == "serial"): + # eggspect = pexpect.fdpexpect.fdspan(telcon, logfile=sys.stdout.buffer) + + ser = serial.Serial(tty, 115200, timeout=5) + + egg = SerialSpawn(ser); + egg.logfile = FileAdapter(logg) + egg.sendline(NL) + has_reset = False + if args.value == "reset-from-console": + has_reset = True + try: + logg.info("prompt: %s user: %s passwd: %s" % (prompt, user, passwd)) + while True: + i = egg.expect([prompt, "Please press Enter to activate", "login:", "Password:", "IPQ6018#"], + timeout=3) + logg.info("expect-0: %i" % (i)) + if (i == 0): + logg.info("Found prompt, login complete.") + break + if (i == 1): + logg.info("Sending newline") + egg.setdline(NL) + if (i == 2): + logg.info("Sending username: %s" % (user)) + egg.sendline(user) + if (i == 3): + logg.info("Sending password: %s" % (passwd)) + egg.sendline(passwd) + if (i == 4): # in bootloader + if has_reset: + logg.info("In boot loader, will reset and sleep 30 seconds") + egg.sendline("reset") + time.sleep(30) + egg.sendline(NL) + sys.exit(1) + else: + print("BOOTLOADER-CONSOLE-IPQ6018#") + break + else: + logg.info("Found prompt, login complete.") + break + except Exception as e: + # maybe something like 'logread -f' is running? + # send ctrl-c + egg.send(chr(3)) + + elif (scheme == "ssh"): + # Not implemented/tested currently. --Ben + if (port is None): + port = 22 + cmd = "ssh -p%d %s@%s" % (port, user, host) + logg.info("Spawn: " + cmd + NL) + egg = pexpect.spawn(cmd) + # egg.logfile_read = sys.stdout.buffer + egg.logfile = FileAdapter(logg) + i = egg.expect(["password:", "continue connecting (yes/no)?"], timeout=3) + time.sleep(0.1) + if i == 1: + egg.sendline('yes') + egg.expect('password:') + sleep(0.1) + egg.sendline(passwd) + + elif (scheme == "telnet"): + # Not implemented/tested currently. --Ben + if (port is None): + port = 23 + cmd = "telnet %s %d" % (host, port) + logg.info("Spawn: " + cmd + NL) + egg = pexpect.spawn(cmd) + egg.logfile = FileAdapter(logg) + time.sleep(0.1) + egg.sendline(' ') + egg.expect('User\:') + egg.sendline(user) + egg.expect('Password\:') + egg.sendline(passwd) + egg.sendline('config paging disable') + else: + usage() + exit(1) + except Exception as e: + logging.exception(e); + + command = None + + CLOSEDBYREMOTE = "closed by remote host." + CLOSEDCX = "Connection to .* closed." + + try: + egg.expect(CCPROMPT) + except Exception as e: + egg.sendline(NL) + + TO = 10 + wait_forever = False + + # Clean pending output + egg.sendline("echo __hello__") + egg.expect("__hello__") + egg.expect(CCPROMPT) + + logg.info("Action[%s] Value[%s] Value2[%s]" % (args.action, args.value, args.value2)) + + if (args.action == "reboot"): + command = "reboot" + TO = 60 + + if (args.action == "cmd"): + if (args.value is None): + raise Exception("cmd requires value to be set.") + command = "%s" % (args.value) + + if (args.action == "logread"): + command = "logread -f" + TO = 1 + wait_forever = True + + if (args.action == "journalctl"): + command = "journalctl -f" + TO = 1 + wait_forever = True + + if (args.action == "lurk"): + command = "date" + TO = 1 + wait_forever = True + + if (args.action == "ssh-tunnel"): + command = "%s" % (args.value) + passwd = "%s" % (args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline(passwd) + egg.expect(CCPROMPT, timeout=20) + return + + if ((args.action == "sysupgrade") or (args.action == "sysupgrade-n")): + command = "scp %s /tmp/new_img.bin" % (args.value) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + if (args.action == "sysupgrade-n"): + egg.sendline("sysupgrade -n /tmp/new_img.bin") + else: + egg.sendline("sysupgrade /tmp/new_img.bin") + egg.expect("link becomes ready", timeout=100) + return + + if (args.action == "download"): + command = "scp %s /tmp/%s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("Network unreachable, wait 15 seconds and try again.") + time.sleep(15) + command = "scp %s /tmp/%s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("ERROR: Could not connect to LANforge to get download file") + exit(2) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + return + + if (args.action == "upload"): + command = "scp %s %s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("Network unreachable, wait 15 seconds and try again.") + time.sleep(15) + command = "scp /tmp/%s %s" % (args.value, args.value2) + logg.info("Command[%s]" % command) + egg.sendline(command); + + i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5) + if i == 2: + print("ERROR: Could not connect to LANforge to put upload file") + exit(2) + if i == 1: + egg.sendline("y") + egg.expect("password:", timeout=5) + egg.sendline("lanforge") + egg.expect(CCPROMPT, timeout=20) + return + + if (command is None): + logg.info("No command specified, going to log out.") + else: + logg.info("Command[%s]" % command) + egg.sendline(command); + while True: + try: + i = egg.expect([CCPROMPT, "kmodloader: done loading kernel", "\n"], timeout=TO) + print(egg.before.decode('utf-8', 'ignore')) + if i == 1: + egg.sendline(' ') + egg.expect(CCPROMPT, timeout=20) + print(egg.before.decode('utf-8', 'ignore')) + if i == 2: # new line of text, just print and continue + continue + # wait_forever = False + if not wait_forever: + break + + except Exception as e: + # Some commands take a long time (logread -f) + if not wait_forever: + logging.exception(e) + break + + +# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- +if __name__ == '__main__': + main() + +#### +#### +#### diff --git a/libs/tip_2x/schemacheck.py b/libs/tip_2x/schemacheck.py new file mode 100644 index 000000000..62307392a --- /dev/null +++ b/libs/tip_2x/schemacheck.py @@ -0,0 +1,603 @@ +""" +This class consists of functions which checks the schema of the configuration for lab +Whether the schema contains all the necessary key-value pairs or not +If not it will inform the required key-value pair +End of the program called every function that checks all the schema data +""" +import logging +import re + + +class SchemaCheck: + """ + Global variables are declared for easy modification and checks of some data + """ + global target_var, dut_keys, tg_keys, testbed_name + target_var = "dut_lib_template" + testbed_name = 'basic' + + def __init__(self, configuration=None): + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) + self.configuration = configuration + self.testbed_list = None + self.len_testbed_list = None + self.key_check_arr = ['target', 'controller', 'device_under_tests', 'traffic_generator'] + + def set_data(self): + """ + This Function sets the value of how many testbeds are there in the schema input file and stores the number of it + """ + testbed_list = [] + for key in self.configuration: + print(key) + testbed_list.append(key) + print(testbed_list) + self.testbed_list = testbed_list + self.len_testbed_list = len(testbed_list) + + def key_check(self): + """ + This fun checks the keys of the testbeds present in schema such as target, controller, DUT, traffic generator + """ + arr = [] + for a in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[a]]: + print(key) + arr.append(key) + print(arr) + if arr == self.key_check_arr: + arr.clear() + print("All keys are present in the schema for Testbed") + logging.info("All keys are present in the schema for Testbed") + else: + arr.clear() + logging.error("Not all the keys required present in schema for Testbed") + + def target_check(self): + """ + This function checks the global target we have declared is matching in the schema or not + """ + global target_var + for a in range(self.len_testbed_list): + if self.configuration[self.testbed_list[a]]['target'] == target_var: + logging.info("Target is matching") + else: + logging.error("Target variable is not matching") + + def controller_check(self): + """ + This func checks the keys of Controller such as Url, Username and password + """ + arr = ['url', 'username', 'password'] + lis = [] + for a in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[a]]['controller']: + lis.append(key) + print(self.testbed_list[a], "->", lis) + if lis == arr: + lis.clear() + print("All keys are present in the Controller data of schema") + logging.info("All keys are present in the Controller data of schema") + else: + lis.clear() + logging.error("Not all the Controller keys required present in schema") + + def dut_keys_check(self): + """ + This func checks DUT keys if every key is present in the schema or not + """ + global dut_keys + arr, arr2, arr3 = [], [], [] + dut_keys = ['model', 'supported_bands', 'supported_modes', 'wan_port', 'lan_port', 'ssid', 'mode', 'identifier', + 'method', 'host_ip', 'host_username', 'host_password', 'host_ssh_port', 'serial_tty', + 'firmware_version'] + for a in range(self.len_testbed_list): + for b in range(len(self.configuration[self.testbed_list[a]]['device_under_tests'])): + for key in self.configuration[self.testbed_list[a]]['device_under_tests'][b]: + arr.append(key) + arr2 = list(set(dut_keys) - set(arr)) + arr3.append(arr2) + # print(arr3) + arr.clear() + for a in range(len(arr3)): + if len(arr3[a]) == 0: + logging.info("All keys of DUT are present") + self.dut_values_check() + elif len(arr3[a]) == 1: + if arr3[a][0] == 'ssid': + logging.warning("Ssid key is not present" + str(self.testbed_list[a]) + "->" + str(arr3[a])) + self.dut_values_check() + else: + logging.error( + "Required keys of DUT are not present, Please include those" + str(self.testbed_list[a]) + + "->" + str(arr3[a])) + else: + logging.error( + "Not all Keys of DUT required are present" + str(self.testbed_list[a]) + "->" + str(arr3[a])) + + def dut_values_check(self): + """ + This func checks whether all the values of DUT Keys are valid or not. Use it after dut_keys_check() + """ + global dut_keys + print("DUT Key->value Check") + for a in range(self.len_testbed_list): + for b in range(len(self.configuration[self.testbed_list[a]]['device_under_tests'])): + for key, value in self.configuration[self.testbed_list[a]]['device_under_tests'][b].items(): + # print(key, value) + # print(type(value)) + if key == 'model': + if type(value) == str: + logging.info("Model key->values are present and eligible") + else: + logging.error( + "Model key->values which are present are not eligible" + str(key) + "->" + str(value)) + elif key == 'supported_bands': + if type(value) == list: + logging.info("Supported bands key->values are present and eligible") + else: + logging.error( + "Supported bands key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'supported_modes': + if type(value) == list: + logging.info("Supported modes key->values are present and eligible") + else: + logging.error( + "Supported modes key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'wan_port': + if type(value) == str: + x = re.search("\d.\d.", value) + if x is not None: + logging.info("Wan port key->values are present and eligible") + else: + logging.error( + "Wan port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'lan_port': + if value is None or type(value) == str: + if type(value) == str: + x = re.search("\d.\d.", value) + if x is not None: + logging.info("Lan port key->values are present and eligible") + else: + logging.error("Lan port key->values are present and not eligible") + else: + logging.info("Lan port is null or None") + else: + logging.error("Lan port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'ssid': + if type(value) == dict: + self.ssid_data_check() + logging.info("Ssid key->values are present and eligible") + else: + logging.error("Ssid key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'mode': + if type(value) == str: + logging.info("Mode key->values are present and eligible") + else: + logging.error("Mode key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'identifier': + if type(value) == str and type(value) is not None: + logging.info("Identifier key->values are present and eligible") + else: + logging.error( + "Identifier key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'method': + if type(value) == str and (value == 'serial' or value == 'ssh' or value == 'telnet'): + logging.info("Method key->values are present and eligible") + else: + logging.error("Method key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_ip': + if type(value) == str: + logging.info("Host IP key->values are present and eligible") + else: + logging.error("Host IP key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_username': + if type(value) == str: + logging.info("Host Username key->values are present and eligible") + else: + logging.error( + "Host Username key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_password': + if type(value) == str: + logging.info("Host Password key->values are present and eligible") + else: + logging.error( + "Host Password key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'host_ssh_port': + if type(value) == int: + logging.info("Host ssh Port key->values are present and eligible") + else: + logging.error( + "Host ssh Port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'serial_tty': + if type(value) == str: + logging.info("Serial tty key->values are present and eligible") + else: + logging.error( + "Serial tty key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'firmware_version': + if type(value) == str: + logging.info("Firmware version key->values are present and eligible") + else: + logging.error( + "Firmware version key->values which are present are not eligible" + str(key) + "->" + + str(value)) + + def traffic_generator_keys_check(self): + """ + THis Func checks the Traffic generator keys are present in the schema or not. It should be called after + dut_values_check() + """ + global tg_keys + tg_keys = ['name', 'testbed', 'scenario', 'details'] + lis = [] + for count in range(self.len_testbed_list): + for key in self.configuration[self.testbed_list[count]]['traffic_generator']: + lis.append(key) + print(self.testbed_list[count], "->", lis) + if lis == tg_keys: + lis.clear() + print("All keys are present in the Traffic generator data of schema") + logging.info("All keys are present in the Traffic generator data of schema") + self.traffic_generator_values_check(count) + else: + lis.clear() + logging.error("Not all the Traffic generator keys required are present in schema") + + def ssid_data_check(self): + """ + This func has to check the Ssid data check in DUT values if SSid key is present in it + """ + pass + + def traffic_generator_values_check(self, count): + """ + This func validates the traffic generator values and is called from traffic_generator_keys_check() after + keys are checked + """ + global testbed_name + logging.info("Traffic generator Key->value check") + for key, value in self.configuration[self.testbed_list[count]]['traffic_generator'].items(): + if key == 'name': + if type(value) == str: + logging.info("Name key->value are present and Eligible") + else: + logging.error("Name key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'testbed': + if type(value) == str and value == testbed_name: + logging.info("Testbed key->value are present and Eligible") + else: + logging.error("Testbed key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'scenario': + if type(value) == str and (value == 'dhcp-bridge' or value == 'dhcp-external'): + logging.info("Scenario key->value are present and Eligible") + else: + logging.error("Scenario key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'details': + if type(value) == dict: + self.tg_details_data_keys_check(count) + logging.info("Details key->value are present and Eligible") + else: + logging.error("Details key->values which are present are not eligible" + str(key) + "->" + + str(value)) + + def tg_details_data_keys_check(self, count): + """ + This Func checks the Details data keys of Traffic generator and is called in traffic_generator_values_check() + after details key is validated there for further validation of details dict + """ + global tg_details_keys + tg_details_keys = ['manager_ip', 'http_port', 'ssh_port', 'setup', 'wan_ports', 'lan_ports', 'uplink_nat_ports'] + lis = [] + for key in self.configuration[self.testbed_list[count]]['traffic_generator']['details']: + lis.append(key) + print(self.testbed_list[count], "->", lis) + if lis == tg_details_keys: + lis.clear() + print("All keys are present in the Traffic generator Details data of schema") + logging.info("All keys are present in the Traffic generator Details data of schema") + self.tg_details_values_check(count) + else: + lis.clear() + logging.error("Not all the Traffic generator Details keys required are present in schema") + + def tg_details_values_check(self, count): + """ + This Func validates the Details data Values of Traffic generator and is called in tg_details_data_keys_check() + after details keys are validated + """ + logging.info("Traffic generator Key->value check") + for key, value in self.configuration[self.testbed_list[count]]['traffic_generator']['details'].items(): + if key == 'manager_ip': + if type(value) == str: + logging.info("Manager ip key->value are present and Eligible") + else: + logging.error("Manager ip key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'http_port': + if type(value) == int: + logging.info("Http port key->value are present and Eligible") + else: + logging.error("Http port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'ssh_port': + if type(value) == int: + logging.info("Ssh port key->value are present and Eligible") + else: + logging.error("Ssh port key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'setup': + if type(value) == dict: + key2 = self.configuration[self.testbed_list[count]]['traffic_generator']['details']['setup'] + value2 = self.configuration[self.testbed_list[count]]['traffic_generator']['details']['setup'][ + 'method'] + if key2 == 'method': + if type(value2) == str: + if value2 == 'build': + logging.info("Method - Build key->value are present and Eligible") + elif value2 == 'load': + if key2['DB'] == str: + logging.info("Method - Load key->value are present and Eligible") + else: + logging.error("Method key->values which are present are not eligible" + str(key) + + "->" + + str(value)) + logging.info("Setup key->value are present and Eligible") + else: + logging.error("Setup key->values which are present are not eligible" + str(key) + "->" + + str(value)) + elif key == 'wan_ports': + if type(value) == dict: + self.tg_ports_data_keys_check(key, count) + else: + logging.error("Wan Ports data is not eligible") + elif key == 'lan_ports': + if type(value) == dict: + # self.tg_ports_data_keys_check(key, count) + pass + else: + logging.error("Lan Ports data is not eligible") + elif key == 'uplink_nat_ports': + if type(value) == dict: + self.tg_ports_data_keys_check(key, count) + else: + logging.error("Uplink nat Ports data is not eligible") + + def tg_ports_data_keys_check(self, key, count): + """ + This Func validates the Ports data Values of Traffic generator and is called in tg_details_values_check() + after details values are validated. It will check for patterns like 1.1.eth2 + """ + ports = self.configuration[self.testbed_list[count]]['traffic_generator']['details'][key] + print("Data of ---------------", key) + print(ports) + for key1, value1 in ports.items(): + if type(key1) == str and type(value1) == dict: + x = re.search("\d.\d.", key1) + if x is not None: + logging.info("Key of" + str(key) + "->" + str(key1) + "is eligible") + self.tg_ports_addressing_check(value1) + else: + logging.error("Key of" + str(key) + "->" + str(key1) + "is not eligible") + else: + logging.error("Key of" + str(key) + "->" + str(key1) + "is not eligible and is not a string") + + @staticmethod + def tg_ports_addressing_check(value): + """ + This function checks the addressing data if values present has ip address pattern or not. It is called in + tg_ports_data_keys_check() + """ + print("Value--------------") + print(value) + if value['addressing'] == 'static': + for key, value2 in value.items(): + if key == 'ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip is present and eligible in ports") + elif key == 'gateway_ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d*$", value2) + if value2 is not None: + logging.info("Gateway Ip is present and eligible in ports") + elif key == 'ip_mask': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip Mask is present and eligible in ports") + elif key == 'dns_servers' and type(value2) == str: + logging.info("DNS server is present and eligible in ports") + elif key == 'addressing': + logging.info("Skipping Addressing ,As it is already verified") + else: + logging.error("Please look into the Ports data") + elif value['addressing'] == 'dynamic': + pass + elif value['addressing'] == 'dhcp-server': + for key, value2 in value.items(): + if key == 'ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip is present and eligible in ports") + elif key == 'gateway_ip': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d*$", value2) + if value2 is not None: + logging.info("Gateway Ip is present and eligible in ports") + elif key == 'ip_mask': + value2 = re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", value2) + if value2 is not None: + logging.info("Ip Mask is present and eligible in ports") + elif key == 'dns_servers' and type(value2) == str: + logging.info("DNS server is present and eligible in ports") + elif key == 'addressing': + logging.info("Skipping Addressing ,As it is already verified") + else: + logging.error("Please look into the Ports data") + + +if __name__ == '__main__': + var = { + "CONFIGURATION": { + 'basic-06': { + 'target': 'dut_lib_template', + 'controller': { + 'url': 'https://sec-qa01.cicd.lab.wlan.tip.build:16001', + 'username': 'tip@ucentral.com', + 'password': 'OpenWifi%123' + }, + 'device_under_tests': [{ + 'model': 'edgecore_eap102', # Will be string + 'supported_bands': ['2G', '5G'], # ['2G', '5G', '6G'] + 'supported_modes': ['BRIDGE', 'NAT', 'VLAN'], # Will remain same + 'wan_port': '1.1.eth2', # Has to be + 'lan_port': '1.1.eth2', # Has to be null or none + 'ssid': { # Has to be seperate func + '2g-ssid': 'OpenWifi', + '5g-ssid': 'OpenWifi', + '6g-ssid': 'OpenWifi', + '2g-password': 'OpenWifi', + '5g-password': 'OpenWifi', + '6g-password': 'OpenWifi', + '2g-encryption': 'WPA2', + '5g-encryption': 'WPA2', + '6g-encryption': 'WPA3', + '2g-bssid': '68:7d:b4:5f:5c:31', + '5g-bssid': '68:7d:b4:5f:5c:3c', + '6g-bssid': '68:7d:b4:5f:5c:38' + }, + 'mode': 'wifi6', # ['wifi5', 'wifi6', 'wifi6e'] + 'identifier': '903cb39d6918', # Has to be not Null + 'method': 'serial', # Has to be serial, ssh, telnet + 'host_ip': 'localhost', # Ip or localhost + 'host_username': 'lanforge', # Str + 'host_password': 'pumpkin77', # Str + 'host_ssh_port': 8852, # Int + 'serial_tty': '/dev/ttyAP2', # Str + 'firmware_version': 'next-latest' # Str + }], + 'traffic_generator': { + 'name': 'lanforge', # STR + 'testbed': 'basic', # [basic, ] + 'scenario': 'dhcp-bridge', # dhcp-bridge, dhcp-external + 'details': { + 'manager_ip': 'localhost', # Str or ip + 'http_port': 8850, # int + 'ssh_port': 8851, # int + 'setup': {'method': 'build', 'DB': 'Test_Scenario_Automation'}, + # Method-> build/load, if load-> DB + 'wan_ports': { # addressing(dhcp-server, static, dynamic) Subnet-> ip/ cannot be eth2(1.1.eth2) + '1.1.eth2': {'addressing': 'dhcp-server', 'subnet': '172.16.0.1/16', 'dhcp': { # DICT + 'lease-first': 10, # int + 'lease-count': 10000, # int + 'lease-time': '6h' # str + } + } + }, + 'lan_ports': { + + }, + 'uplink_nat_ports': { + '1.1.eth3': { + 'addressing': 'static', # If static -> need ip, g_ip, ip_mask, dns + 'ip': '10.28.2.17', + 'gateway_ip': '10.28.2.1/24', + 'ip_mask': '255.255.255.0', + 'dns_servers': 'BLANK' + } + } + } + } + }, + "advance-03": { + "target": "dut_lib_template", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf196", + "supported_bands": ["2G", "5G", "6G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.3.eth2", + "lan_port": None, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6e", + "identifier": "824f816011e4", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": 8902, + "serial_tty": "/dev/ttyAP0", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "10.28.3.117", + "http_port": 8900, + "ssh_port": 8901, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.3.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.3.eth3": { + "addressing": "static", + "ip": "10.28.2.39", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } + } + } + obj = SchemaCheck(var["CONFIGURATION"]) + obj.set_data() + obj.key_check() + obj.target_check() + obj.controller_check() + obj.dut_values_check() + obj.traffic_generator_keys_check() diff --git a/libs/tip_2x/setup.py b/libs/tip_2x/setup.py new file mode 100644 index 000000000..b308b7711 --- /dev/null +++ b/libs/tip_2x/setup.py @@ -0,0 +1,21 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name='tip_2x', + version='0.1', + scripts=['tip_2x.py', 'controller.py', 'ap_lib.py', 'SetupLibrary.py', 'openwrt_ctl.py'], + author="Shivam Thakur", + author_email="shivam.thakur@candelatech.com", + description="TIP OpenWIFI 2.X Library", + long_description=long_description, + long_description_content_type="text/markdown", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) diff --git a/libs/tip_2x/tip_2x.py b/libs/tip_2x/tip_2x.py new file mode 100644 index 000000000..f9b5125ac --- /dev/null +++ b/libs/tip_2x/tip_2x.py @@ -0,0 +1,1148 @@ +""" + Telecom Infra Project OpenWifi 2.X (Ucentral libraries for Test Automation) + + +""" +import importlib +import json +import random +import string +import time + +import allure +import pytest +import requests + +logging = importlib.import_module("logging") + +ap_lib = importlib.import_module("ap_lib") +controller = importlib.import_module("controller") + +""" + Custom Class Imports needed for OpenWifi 2.X +""" + +ConfigureController = controller.ConfigureController +Controller = controller.Controller +FMSUtils = controller.FMSUtils +ProvUtils = controller.ProvUtils +UProfileUtility = controller.UProfileUtility +APLIBS = ap_lib.APLIBS + + +class tip_2x: + """ + Standard OpenWifi wlan-testing specific variables + + """ + controller_data = {} + device_under_tests_info = [] + """ + OpenWifi 2.x Specific Variables that will be only scoped in dut_lib_template Library + + """ + ow_sec_url = "" + ow_sec_login_username = "" + ow_sec_login_password = "" + target = "tip_2x" + controller_library_object = object() + prov_library_object = object() + firmware_library_object = object() + dut_library_object = object() + supported_bands = ["2G", "5G", "6G", "5G-lower", "5G-upper"] + supported_modes = ["BRIDGE", "NAT", "VLAN"] + supported_encryption = ["open", + "wpa", + "wpa2_personal", + "wpa3_personal", + "wpa_wpa2_personal_mixed", + "wpa3_personal_mixed", + "wpa_enterprise", + "wpa2_enterprise", + "wpa3_enterprise", + "wpa_wpa2_enterprise_mixed", + "wpa3_enterprise_mixed", + "wpa3_enterprise_192" + ] + tip_2x_specific_encryption_translation = {"open": "none", + "wpa": "psk", + "wpa2_personal": "psk2", + "wpa3_personal": "sae", + "wpa3_personal_mixed": "sae-mixed", + "wpa_wpa2_personal_mixed": "psk-mixed", + "wpa_enterprise": "wpa", + "wpa2_enterprise": "wpa2", + "wpa3_enterprise": "wpa3", + "wpa_wpa2_enterprise_mixed": "wpa-mixed", + "wpa3_enterprise_mixed": "wpa3-mixed", + "wpa3_enterprise_192": "wpa3-192" + } + + def __init__(self, controller_data=None, target=None, configuration=None, + device_under_tests_info=[], logging_level=logging.INFO): + logging.basicConfig(format='%(asctime)s - %(message)s', level=logging_level) + if target != self.target: + logging.error("Target version is : " + target + " Expected target is tip_2x") + pytest.exit("Target should be 'tip_2x', Current Target is : " + target) + if controller_data is None: + controller_data = {} + self.controller_data = controller_data + self.configuration = configuration + self.device_under_tests_info = device_under_tests_info + self.setup_metadata() + self.setup_objects() + self.setup_environment_properties() + + """ + Controller and Access Point specific metadata that is related to OpenWifi 2.x + """ + + def setup_metadata(self): + logging.info( + "Setting up the Controller metadata for tip_2x Library: " + str(json.dumps(self.controller_data, indent=2))) + logging.info("Setting up the DUT metadata for tip_2x Library: " + str( + json.dumps(self.device_under_tests_info, indent=2))) + logging.info("Number of DUT's in lab_info.json: " + str(len(self.device_under_tests_info))) + self.ow_sec_url = self.controller_data["url"] + self.ow_sec_login_username = self.controller_data["username"] + self.ow_sec_login_password = self.controller_data["password"] + + def setup_objects(self): + try: + self.controller_library_object = Controller(controller_data=self.controller_data) + self.prov_library_object = ProvUtils(sdk_client=self.controller_library_object) + self.firmware_library_object = FMSUtils(sdk_client=self.controller_library_object) + except Exception as e: + pytest.fail("Unable to setup Controller Objects") + logging.error("Exception in setting up Controller objects:" + str(e)) + try: + self.dut_library_object = APLIBS(dut_data=self.device_under_tests_info) + except Exception as e: + logging.error("Exception in setting up Access Point Library object:" + str(e)) + pytest.fail("Unable to setup AP Objects") + + def teardown_objects(self): + self.controller_library_object.logout() + + """ Standard getter methods. Should be available for all type of libraries. Commonly used by wlan-testing""" + + def get_dut_library_object(self): + return self.dut_library_object + + def get_controller_library_object(self): + return self.controller_library_object + + def get_controller_data(self): + return self.controller_data + + def get_device_under_tests_info(self): + return self.device_under_tests_info + + def get_number_of_dut(self): + return len(self.device_under_tests_info) + + def get_dut_logs(self, dut_idx=0): + return self.dut_library_object.get_logs(idx=0) + + def get_controller_logs(self): + pass + + def get_dut_max_clients(self): + pass + + def setup_configuration_data(self, configuration=None, + requested_combination=None): + c_data = configuration.copy() + if c_data is None: + pytest.exit("No Configuration Received") + if requested_combination is None: + pytest.exit("No requested_combination Received") + rf_data = None + if c_data.keys().__contains__("rf"): + rf_data = c_data["rf"] + # base_band_keys = ["2G", "5G", "6G", "5G-lower", "5G-upper"] + base_dict = dict.fromkeys(self.supported_bands) + for i in base_dict: + base_dict[i] = [] + for i in requested_combination: + if i[0] in self.supported_bands: + base_dict[i[0]].append(self.tip_2x_specific_encryption_translation[i[1]]) + if i[1] in self.supported_bands: + base_dict[i[1]].append((self.tip_2x_specific_encryption_translation[i[0]])) + temp = [] + for i in list(base_dict.values()): + for j in i: + temp.append(j) + temp_conf = c_data["ssid_modes"].copy() + for i in temp_conf: + if self.tip_2x_specific_encryption_translation[i] not in temp: + c_data["ssid_modes"].pop(i) + + temp_conf = c_data["ssid_modes"].copy() + print(self.tip_2x_specific_encryption_translation) + for i in temp_conf: + for j in range(len(temp_conf[i])): + for k in temp_conf[i][j]["appliedRadios"]: + if self.tip_2x_specific_encryption_translation[i] not in base_dict[k]: + c_data["ssid_modes"][i][j]["appliedRadios"].remove(k) + if c_data["ssid_modes"][i][j]["appliedRadios"] == []: + c_data["ssid_modes"][i][j] = {} # .popi.popitem()) # .popitem() + + for i in c_data["ssid_modes"]: + c_data["ssid_modes"][i] = [x for x in c_data["ssid_modes"][i] if x != {}] + for ssids in c_data["ssid_modes"]: + for i in c_data["ssid_modes"][ssids]: + if i is not {}: + i["security"] = self.tip_2x_specific_encryption_translation[ssids] + temp_conf = c_data.copy() + for i in range(0, len(self.device_under_tests_info)): + if c_data["mode"] not in self.device_under_tests_info[i]["supported_modes"]: + pytest.skip(c_data["mode"] + " is not Supported by DUT") + for enc in c_data["ssid_modes"]: + for idx in c_data["ssid_modes"][enc]: + check = all( + item in self.device_under_tests_info[i]["supported_bands"] for item in idx["appliedRadios"]) + if not check: + temp_conf["ssid_modes"][enc].remove(idx) + for key in c_data["rf"]: + if key not in self.device_under_tests_info[i]["supported_bands"]: + print(key) + temp_conf["rf"][key] = None + + return temp_conf + + """ + setup_basic_configuration - Method to configure AP in basic operating modes with multiple SSID's and multiple AP's + This covers, basic and advanced test cases + """ + + def setup_basic_configuration(self, configuration=None, + requested_combination=None, open_roaming=False): + f_conf = self.setup_configuration_data(configuration=configuration, + requested_combination=requested_combination) + if open_roaming: + logging.info("Selected Configuration of open roaming: " + str(json.dumps(f_conf, indent=2))) + final_configuration = f_conf.copy() + # Setup Mode + profile_object = UProfileUtility(sdk_client=self.controller_library_object) + if final_configuration["mode"] in self.supported_modes: + profile_object.set_mode(mode=final_configuration["mode"], open_roaming=open_roaming) + else: + pytest.skip(final_configuration["mode"] + " Mode is not supported") + + # Setup Radio Scenario + if final_configuration["rf"] != {}: + profile_object.set_radio_config(radio_config=final_configuration["rf"], open_roaming=open_roaming) + else: + final_configuration["rf"] = {"2G": {}, "5G": {}, "6G": {}} + profile_object.set_radio_config(open_roaming=open_roaming) + for ssid in final_configuration["ssid_modes"]: + for ssid_data in final_configuration["ssid_modes"][ssid]: + if final_configuration["radius"]: + if "radius_auth_data" in ssid_data: + RADIUS_SERVER_DATA = ssid_data["radius_auth_data"] + RADIUS_ACCOUNTING_DATA = ssid_data["radius_acc_data"] + else: + RADIUS_SERVER_DATA = self.configuration.PASSPOINT_RADIUS_SERVER_DATA + RADIUS_ACCOUNTING_DATA = self.configuration.PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA + PASSPOINT_DATA = self.configuration.PASSPOINT + profile_object.add_ssid(ssid_data=ssid_data, radius=True, radius_auth_data=RADIUS_SERVER_DATA, + radius_accounting_data=RADIUS_ACCOUNTING_DATA, + pass_point_data=PASSPOINT_DATA, open_roaming=open_roaming) + else: + profile_object.add_ssid(ssid_data=ssid_data, radius=False, open_roaming=open_roaming) + logging.info( + "Configuration That is getting pushed: " + json.dumps(profile_object.base_profile_config, indent=2)) + else: + logging.info("Selected Configuration: " + str(json.dumps(f_conf, indent=2))) + final_configuration = f_conf.copy() + # Setup Mode + profile_object = UProfileUtility(sdk_client=self.controller_library_object) + if final_configuration["mode"] in self.supported_modes: + profile_object.set_mode(mode=final_configuration["mode"]) + else: + pytest.skip(final_configuration["mode"] + " Mode is not supported") + + # Setup Radio Scenario + if final_configuration["rf"] != {}: + profile_object.set_radio_config(radio_config=final_configuration["rf"]) + else: + final_configuration["rf"] = {"2G": {}, "5G": {}, "6G": {}} + profile_object.set_radio_config() + for ssid in final_configuration["ssid_modes"]: + for ssid_data in final_configuration["ssid_modes"][ssid]: + if final_configuration["radius"]: + if "radius_auth_data" in ssid_data: + RADIUS_SERVER_DATA = ssid_data["radius_auth_data"] + RADIUS_ACCOUNTING_DATA = ssid_data["radius_acc_data"] + else: + RADIUS_SERVER_DATA = self.configuration.RADIUS_SERVER_DATA + RADIUS_ACCOUNTING_DATA = self.configuration.RADIUS_ACCOUNTING_DATA + profile_object.add_ssid(ssid_data=ssid_data, radius=True, radius_auth_data=RADIUS_SERVER_DATA, + radius_accounting_data=RADIUS_ACCOUNTING_DATA) + else: + profile_object.add_ssid(ssid_data=ssid_data, radius=False) + logging.info( + "Configuration That is getting pushed: " + json.dumps(profile_object.base_profile_config, indent=2)) + + # Setup Config Apply on all AP's + ret_val = dict() + for i in range(0, len(self.device_under_tests_info)): + self.pre_apply_check(idx=i) # Do check AP before pushing the configuration + + S = 9 + instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) + for i in range(len(self.device_under_tests_info)): + self.get_dut_library_object().run_generic_command( + cmd="logger start testcase: " + instance_name, + idx=i) + + # Check the latest uuid + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=True, attach_allure=False) + uuid_before_apply = r_data["latest"] + + # attaching ap logs before config push + ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False) + allure.attach(body=ap_logs, name="AP Log Before config push: ") + resp = object() + # Apply the Config + try: + resp = profile_object.push_config(serial_number=self.device_under_tests_info[i]["identifier"]) + logging.info("Response" + str(resp)) + except Exception as e: + ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False) + allure.attach(body=ap_logs, name="Failure while pushing- AP Logs: ") + allure.attach(body=str(e), name="Exception data after config push: ") + logging.info("Error in apply config" + str(e)) + logging.info("Response for Config apply: " + str(resp.status_code)) + if resp.status_code != 200: + logging.info("Failed to apply Configuration to AP. Response Code" + + str(resp.status_code) + + "Retrying in 5 Seconds... ") + ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False) + allure.attach(body=ap_logs, name="AP logs during config fails: ") + time.sleep(5) + try: + resp = profile_object.push_config(serial_number=self.device_under_tests_info[i]["identifier"]) + logging.info("Response" + str(resp)) + except Exception as e: + ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False) + allure.attach(body=ap_logs, name="Failure while pushing- AP Logs: ") + allure.attach(body=str(e), name="Exception data after config push: ") + logging.info("Error in apply config" + str(e)) + if resp.status_code != 200: + ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False) + allure.attach(body=ap_logs, name="AP logs during config fails: ") + logging.error("Failed to apply Config, Response code:" + str(resp.status_code)) + pytest.fail("Failed to apply Config, Response code :" + str(resp.status_code)) + + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=True, attach_allure=False) + uuid_after_apply = r_data["latest"] + x = 0 + while uuid_before_apply == uuid_after_apply: + time.sleep(10) + x += 1 + logging.info("uuid_before_apply: " + str(uuid_before_apply)) + logging.info("uuid_after_apply: " + str(uuid_after_apply)) + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False) + uuid_after_apply = r_data["latest"] + if x == 5: + break + time.sleep(5) + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False) + uuid_after_apply = r_data["latest"] + if uuid_after_apply == uuid_before_apply: + logging.error("Config is not received by AP") + logging.info("uuid_before_apply: " + str(uuid_before_apply)) + logging.info("uuid_after_apply: " + str(uuid_after_apply)) + self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True) + pytest.fail("Config sent from Gateway is not received by AP") + self.dut_library_object.get_latest_config_recieved(idx=i, print_log=True, attach_allure=False) + + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False) + latest_uuid = r_data["latest"] + + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False) + active_uuid = r_data["active"] + + x = 0 + while latest_uuid == active_uuid: + time.sleep(10) + x += 1 + logging.info("active_uuid: " + str(active_uuid)) + logging.info("latest_uuid: " + str(latest_uuid)) + r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False) + active_uuid = r_data["active"] + latest_uuid = r_data["latest"] + if x == 5: + break + if latest_uuid != active_uuid: + logging.error("Config is not received by AP") + logging.info("uuid_before_apply: " + str(uuid_before_apply)) + logging.info("uuid_after_apply: " + str(uuid_after_apply)) + self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True) + pytest.fail("Config sent from Gateway is Received by AP, But not Applied by AP") + self.dut_library_object.get_active_config(idx=i, print_log=True, attach_allure=False) + + logging.info("Config is Properly Applied on AP, Waiting for 30 Seconds for All interfaces to come up") + # wait time interfaces to come up + time.sleep(30) + + self.post_apply_check(idx=i) # Do check AP after pushing the configuration + + for i in range(len(self.device_under_tests_info)): + self.get_dut_library_object().run_generic_command( + cmd="logger stop testcase: " + instance_name, + idx=i) + ap_logs = self.get_dut_library_object().get_logread( + start_ref="start testcase: " + instance_name, + stop_ref="stop testcase: " + instance_name) + allure.attach(name='Logs - ' + self.device_under_tests_info[i]["identifier"], + body=str(ap_logs)) + + ret_val[self.device_under_tests_info[i]["identifier"]] = self.get_applied_ssid_info(idx=i, + profile_object=profile_object) + + temp_data = ret_val.copy() + for dut in temp_data: + ret_val[dut] = dict.fromkeys(["ssid_data", "radio_data"]) + ret_val[dut]["radio_data"] = temp_data[dut][-1] + temp_data[dut].pop(-1) + n = len(temp_data[dut]) + lst = list(range(0, n)) + ret_val[dut]["ssid_data"] = dict.fromkeys(lst) + for j in ret_val[dut]["ssid_data"]: + a = temp_data[dut][j].copy() + a = dict.fromkeys(["ssid", "encryption", "password", "band", "bssid"]) + a["ssid"] = temp_data[dut][j][0] + a["encryption"] = temp_data[dut][j][1] + a["password"] = temp_data[dut][j][2] + a["band"] = temp_data[dut][j][3] + a["bssid"] = temp_data[dut][j][4] + ret_val[dut]["ssid_data"][j] = a + temp = ret_val[dut]["radio_data"].copy() + for j in temp: + a = dict.fromkeys(["channel", "bandwidth", "frequency"]) + if temp[j] != None: + a["channel"] = temp[j][0] + a["bandwidth"] = temp[j][1] + a["frequency"] = temp[j][2] + ret_val[dut]["radio_data"][j] = a + return ret_val + + """ + setup_special_configuration - Method to configure APs in mesh operating modes with multiple SSID's and multiple AP's + This covers, mesh and other roaming scenarios which includes any special type of modes + multiple AP's with WDS and Wifi Steering scenarios are also covered here + """ + + def setup_special_configuration(self, configuration=None, + requested_combination=None): + final_configuration = self.setup_configuration_data(configuration=configuration, + requested_combination=requested_combination) + + logging.info("Selected Configuration: " + str(json.dumps(final_configuration, indent=2))) + + profile_object = UProfileUtility(sdk_client=self.controller_library_object) + if final_configuration["mode"] in self.supported_modes: + profile_object.set_mode(mode=final_configuration["mode"]) + else: + pytest.skip(final_configuration["mode"] + " Mode is not supported") + + # Setup Radio Scenario + if final_configuration["rf"] != {}: + profile_object.set_radio_config(radio_config=final_configuration["rf"]) + else: + profile_object.set_radio_config() + for ssid in final_configuration["ssid_modes"]: + for ssid_data in final_configuration["ssid_modes"][ssid]: + profile_object.add_ssid(ssid_data=ssid_data) + logging.info( + "Configuration That is getting pushed: " + json.dumps(profile_object.base_profile_config, indent=2)) + r_val = False + + # Do check AP before pushing the configuration + # TODO + self.dut_library_object.check_serial_connection() + """ + serial connection check + ubus call ucentral status + save the current uuid + uci show ucentral + ifconfig + wifi status + start logger to collect ap logs before config apply + Timestamp before doing config apply + """ + + for dut in self.device_under_tests_info: + resp = profile_object.push_config(serial_number=dut["identifier"]) + logging.info("Response for Config apply: " + str(resp.status_code)) + if resp.status_code != 200: + logging.info("Failed to apply Configuration to AP. Response Code" + + str(resp.status_code) + + "Retrying in 5 Seconds... ") + time.sleep(5) + resp = profile_object.push_config(serial_number=dut["identifier"]) + if resp.status_code != 200: + logging.info("Failed to apply Config, Response code:" + str(resp.status_code)) + pytest.fail("Failed to apply Config, Response code :" + str(resp.status_code)) + if resp.status_code == 200: + r_val = True + # TODO + """ + serial connection check + ubus call ucentral status + save the current uuid and compare with the one before config apply + save the active config and compare with the latest apply + uci show + ifconfig + iwinfo + wifi status + start logger to collect ap logs before config apply + Timestamp after doing config apply + """ + return r_val + + def get_dut_channel_data(self, idx): + try: + d = self.dut_library_object.run_generic_command(cmd="iw dev | grep channel", idx=idx) + d = d.replace("\n", "").replace("\t", "").replace(" ", "").split("channel") + d.pop(0) + d = list(set(d)) + data = dict.fromkeys(["2G", "5G", "6G"]) + for i in d: + channel = int(i.split("(")[0]) + bandwidth = int(i.split(":")[1].split("MHz")[0]) + center_freq = int(i.split(":")[-1].replace("MHz", "")) + if 2401 < center_freq < 2495: + data["2G"] = [channel, bandwidth, center_freq] + elif center_freq in [5955, 5975, 5995] and channel <= 9: + data["6G"] = [channel, bandwidth, center_freq] + elif 5030 < center_freq < 5990: + data["5G"] = [channel, bandwidth, center_freq] + elif 5995 < center_freq < 7125: + data["6G"] = [channel, bandwidth, center_freq] + else: + pass + except Exception as e: + logging.error("Exception in getting DUT Channel and bw data, Retrying again!") + try: + d = self.dut_library_object.run_generic_command(cmd="iw dev | grep channel", idx=idx) + d = d.replace("\n", "").replace("\t", "").replace(" ", "").split("channel") + d.pop(0) + data = dict.fromkeys(["2G", "5G", "6G"]) + for i in d: + channel = int(i.split("(")[0]) + bandwidth = int(i.split(":")[1].split("MHz")[0]) + center_freq = int(i.split(":")[-1].replace("MHz", "")) + if 2401 < center_freq < 2495: + data["2G"] = [channel, bandwidth, center_freq] + elif center_freq in [5955, 5975, 5995] and channel <= 9: + data["6G"] = [channel, bandwidth, center_freq] + elif 5030 < center_freq < 5990: + data["5G"] = [channel, bandwidth, center_freq] + elif 5995 < center_freq < 7125: + data["6G"] = [channel, bandwidth, center_freq] + else: + pass + except Exception as e: + logging.error("Exception in getting DUT Channel and bw data.") + return data + + def get_applied_ssid_info(self, profile_object=None, idx=0): + if profile_object is None: + logging.error("Profile object is None, Unable to fetch ssid info from AP") + return None + ssid_info_sdk = profile_object.get_ssid_info() + ap_wifi_data = self.dut_library_object.get_iwinfo(idx=idx) + channel_info = self.get_dut_channel_data(idx=idx) + o = ap_wifi_data.split() + iwinfo_bssid_data = {} + print(o) + for i in range(len(o)): + if o[i].__contains__("ESSID"): + if o[i + 9].__contains__("2.4"): + band = "2G" + elif o[i + 9].__contains__("5."): + band = "5G" + else: + band = "6G" + iwinfo_bssid_data[o[i - 1]] = [o[i + 1].replace('"', ''), o[i + 4], band] + for p in iwinfo_bssid_data: + for q in ssid_info_sdk: + if iwinfo_bssid_data[p][0] == q[0] and iwinfo_bssid_data[p][2] == q[3]: + q.append(iwinfo_bssid_data[p][1]) + ssid_info_sdk.append(channel_info) + return ssid_info_sdk + + def get_dut_version(self): + version_info = [] + for ap in range(len(self.device_under_tests_info)): + version_info.append(self.dut_library_object.get_ap_version(idx=ap, print_log=True)) + return version_info + + def get_controller_version(self): + version_info = dict() + version_info["ow_fms"] = self.controller_library_object.get_sdk_version_fms() + version_info["ow_gw"] = self.controller_library_object.get_sdk_version_gw() + version_info["ow_sec"] = self.controller_library_object.get_sdk_version_sec() + version_info["ow_prov"] = self.controller_library_object.get_sdk_version_prov() + # version_info["ow_rrm"] = self.controller_library_object.get_sdk_version_owrrm() + # version_info["ow_analytics"] = self.controller_library_object.get_sdk_version_ow_analytics() + # version_info["ow_sub"] = self.controller_library_object.get_sdk_version_owsub() + return version_info + + # TODO: Get the vlans info such as vlan-ids + # Jitendra + + def vlans_needed(self): + pass + + # TODO: Get the wireless info data structure such as (ssid, bssid, passkey, encryption, band, channel) + # Jitendra + + def pre_apply_check(self, idx=0): + """ + serial connection check + ubus call ucentral status + save the current uuid + uci show ucentral + ifconfig + wifi status + start logger to collect ap logs before config apply + Timestamp before doing config apply + """ + + self.dut_library_object.check_serial_connection(idx=idx) + self.dut_library_object.setup_serial_environment(idx=idx) + self.dut_library_object.verify_certificates(idx=idx) + ret_val = self.dut_library_object.ubus_call_ucentral_status(idx=idx, attach_allure=False, retry=10) + wifi_status = self.dut_library_object.get_wifi_status(idx=idx, attach_allure=False) + allure.attach(name="wifi_status_before_apply: ", body=str(json.dumps(wifi_status, indent=2))) + if not ret_val["connected"] or ret_val["connected"] is None: + self.dut_library_object.check_connectivity(idx=idx) + self.dut_library_object.restart_ucentral_service(idx=idx, attach_allure=False) + time.sleep(30) + ret_val = self.dut_library_object.ubus_call_ucentral_status(idx=idx, attach_allure=False, retry=10) + if not ret_val["connected"] or ret_val["connected"] is None: + self.dut_library_object.check_connectivity(idx=idx) + pytest.fail("AP is in disconnected state from Ucentral gateway!!!") + else: + allure.step("Connected to Gateway after Restarting the ucentral Process!!!") + + # TODO: check the connectivity (if it is not connected, then check the lanforge wan port and bring it + # up if lanforge eth is in down state. Also check the link state of eth port with ip address + # reload the scenario in case it is messed up) + # if wan is available, then run (/etc/init.d/ucentral restart) to retry the connection and check the + # status again in next 30 seconds if still disconnected, then fail and attach the logs, + # Jitendra + # pytest.fail("AP is in disconnected state from Ucentral gateway!!!") + + def post_apply_check(self, idx=0): + """ + ubus call ucentral status + ifconfig - check if up0v0 has ip address + wifi status - check if all phy radios are up + """ + ret_val = self.dut_library_object.ubus_call_ucentral_status(idx=idx, retry=10) + if not ret_val["connected"] or ret_val["connected"] is None: + logging.error(" AP Went to Disconnected State after Applying Config, Checking again after 30 Seconds") + time.sleep(30) + ret_val = self.dut_library_object.ubus_call_ucentral_status(idx=idx) + if not ret_val["connected"] or ret_val["connected"] is None: + logging.error("Dang !!!, AP is still in Disconnected State. Your Config Messed up.") + logging.error("Failed the post apply check on: " + self.device_under_tests_info[idx]["identifier"]) + self.dut_library_object.check_connectivity(idx=idx, attach_allure=False) + self.dut_library_object.check_connectivity(idx=idx) + r_data = self.dut_library_object.get_wifi_status(idx=idx, attach_allure=False) + allure.attach(name="wifi_status_after_apply: ", body=str(json.dumps(r_data, indent=2))) + logging.info("Checking Wifi Status after Config Apply...") + for radio in r_data: + if not r_data[radio]["up"]: + logging.error(radio + " is in down State...") + pytest.fail(radio + " is in down State after config apply") + else: + logging.info(radio + " is up and running") + + def setup_environment_properties(self, add_allure_environment_property=None): + if add_allure_environment_property is None: + return + add_allure_environment_property('Cloud-Controller-SDK-URL', self.controller_data.get("url")) + sdk_version_data = self.get_controller_version() + for microservice in sdk_version_data: + add_allure_environment_property(microservice + '-version', + str(sdk_version_data.get(microservice))) + dut_versions = self.get_dut_version() + for i in range(len(self.device_under_tests_info)): + add_allure_environment_property("Firmware-Version_" + self.device_under_tests_info[i]["identifier"], + str(dut_versions[i])) + + for dut in self.device_under_tests_info: + models = [] + identifiers = [] + models.append(dut["model"]) + identifiers.append(dut["identifier"]) + add_allure_environment_property('DUT-Model/s', ", ".join(models)) + add_allure_environment_property('Serial-Number/s', ", ".join(identifiers)) + + def setup_firmware(self): + # Query AP Firmware + upgrade_status = [] + + for ap in range(len(self.device_under_tests_info)): + + # If specified as URL + try: + response = requests.get(self.device_under_tests_info[ap]['firmware_version']) + logging.info("URL is valid and exists on the internet") + allure.attach(name="firmware url: ", body=str(self.device_under_tests_info[ap]['firmware_version'])) + target_revision_commit = self.device_under_tests_info[ap]['firmware_version'].split("-")[-2] + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version_commit = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + + # if AP is already in target Version then skip upgrade unless force upgrade is specified + if target_revision_commit in current_version_commit: + continue + self.firmware_library_object.upgrade_firmware(serial=self.device_under_tests_info[ap]['identifier'], + url=str( + self.device_under_tests_info[ap]['firmware_version'])) + + items = list(range(0, 300)) + l = len(items) + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version_commit = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + if target_revision_commit in current_version_commit: + upgrade_status.append([self.device_under_tests_info[ap]['identifier'], target_revision_commit, + current_version_commit]) + logging.info("Firmware Upgraded to : " + str(ap_version)) + else: + logging.info("firmware upgraded failed: " + str(target_revision)) + upgrade_status.append([self.device_under_tests_info[ap]['identifier'], target_revision_commit, + current_version_commit]) + break + except Exception as e: + logging.error("URL does not exist on Internet") + # else Specified as "branch-commit_id" / "branch-latest" + firmware_url = "" + ap_version = self.dut_library_object.get_ap_version(idx=ap) + response = self.firmware_library_object.get_latest_fw(model=self.device_under_tests_info[ap]['model']) + # if the target version specified is "branch-latest" + if self.device_under_tests_info[ap]['firmware_version'].split('-')[1] == "latest": + # get the latest branch + firmware_list = self.firmware_library_object.get_firmwares( + model=self.device_under_tests_info[ap]['model'], branch="", commit_id='') + firmware_list.reverse() + + for firmware in firmware_list: + if firmware['image'] == "": + continue + if str(firmware['image']).__contains__("upgrade.bin"): + temp = firmware['image'].split("-") + temp.pop(-1) + temp = "-".join(temp) + firmware['image'] = temp + if self.device_under_tests_info[ap]['firmware_version'].split('-')[0] == 'release': + if firmware['revision'].split("/")[1].replace(" ", "").split('-')[1].__contains__('v2.'): + logging.info("Target Firmware: \n" + str(firmware)) + allure.attach(name="Target firmware : ", body=str(firmware)) + target_revision = firmware['revision'].split("/")[1].replace(" ", "") + + # check the current AP Revision before upgrade + + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + + # print and report the firmware versions before upgrade + allure.attach(name="Before Firmware Upgrade Request: ", + body="current revision: " + str( + current_version) + "\ntarget revision: " + str(target_revision)) + logging.info("current revision: " + str(current_version) + "\ntarget revision: " + str( + target_revision)) + + # if AP is already in target Version then skip upgrade unless force upgrade is specified + if current_version == target_revision: + upgrade_status.append([self.device_under_tests_info[ap]['identifier'], target_revision, + current_version, 'skip']) + logging.info("Skipping Upgrade! AP is already in target version") + allure.attach(name="Skipping Upgrade because AP is already in the target Version", + body="") + break + + self.firmware_library_object.upgrade_firmware( + serial=self.device_under_tests_info[ap]['identifier'], + url=str(firmware['uri'])) + # wait for 300 seconds after firmware upgrade + logging.info("waiting for 300 Sec for Firmware Upgrade") + time.sleep(300) + + # check the current AP Revision again + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + # print and report the Firmware versions after upgrade + allure.attach(name="After Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info("current revision: " + str(current_version) + + "\ntarget revision: " + str(target_revision)) + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded successfully: " + target_revision) + else: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded failed: " + target_revision) + break + if firmware['image'].split("-")[-2] == \ + self.device_under_tests_info[ap]['firmware_version'].split('-')[0]: + logging.info("Target Firmware: \n" + str(firmware)) + allure.attach(name="Target firmware : ", body=str(firmware)) + + target_revision = firmware['revision'].split("/")[1].replace(" ", "") + + # check the current AP Revision before upgrade + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + + # print and report the firmware versions before upgrade + allure.attach(name="Before Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info("current revision: " + current_version + "\ntarget revision: " + target_revision) + + # if AP is already in target Version then skip upgrade unless force upgrade is specified + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version, + 'skip']) + logging.info("Skipping Upgrade! AP is already in target version") + allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") + break + + self.firmware_library_object.upgrade_firmware( + serial=self.device_under_tests_info[ap]['identifier'], url=str(firmware['uri'])) + # wait for 300 seconds after firmware upgrade + logging.info("waiting for 300 Sec for Firmware Upgrade") + time.sleep(500) + + # check the current AP Revision again + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + # print and report the Firmware versions after upgrade + allure.attach(name="After Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info("current revision: " + current_version + "\ntarget revision: " + target_revision) + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded successfully: " + str(target_revision)) + else: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded failed: " + str(target_revision)) + break + # if branch-commit is specified + else: + firmware_list = self.firmware_library_object.get_firmwares( + model=self.device_under_tests_info[ap]['model'], + branch="", commit_id='') + fw_list = [] + # getting the list of firmwares in fw_list that has the commit id specified as an input + for firmware in firmware_list: + if firmware['revision'].split("/")[1].replace(" ", "").split('-')[-1] == \ + self.device_under_tests_info[ap]['firmware_version'].split('-')[1]: + fw_list.append(firmware) + + # If there is only 1 commit ID in fw_list + if len(fw_list) == 1: + + logging.info("Target Firmware: \n" + str(fw_list[0])) + allure.attach(name="Target firmware : ", body=str(fw_list[0])) + + url = fw_list[0]['uri'] + target_revision = fw_list[0]['revision'].split("/")[1].replace(" ", "") + + # check the current AP Revision before upgrade + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + + # print and report the firmware versions before upgrade + allure.attach(name="Before Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info( + "current revision: " + str(current_version) + "\ntarget revision: " + str(target_revision)) + + # if AP is already in target Version then skip upgrade unless force upgrade is specified + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version, 'skip']) + logging.info("Skipping Upgrade! AP is already in target version") + allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") + break + + # upgrade the firmware in another condition + else: + self.firmware_library_object.upgrade_firmware( + serial=self.device_under_tests_info[ap]['identifier'], url=str(url)) + + # wait for 300 seconds after firmware upgrade + logging.info("waiting for 300 Sec for Firmware Upgrade") + time.sleep(300) + + # check the current AP Revision again + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + # print and report the Firmware versions after upgrade + allure.attach(name="After Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info( + "current revision: " + str(current_version) + "\ntarget revision: " + target_revision) + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded successfully: " + target_revision) + else: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version]) + logging.info("firmware upgraded failed: " + str(target_revision)) + break + + # if there are 1+ firmware images in fw_list then check for branch + else: + target_fw = "" + for firmware in fw_list: + if self.device_under_tests_info[ap]['firmware_version'].split('-')[0] == 'release': + if firmware['revision'].split("/")[1].replace(" ", "").split('-')[1].__contains__('v2.'): + target_fw = firmware + break + if firmware['image'].split("-")[-2] == \ + self.device_under_tests_info[ap]['firmware_version'].split('-')[0]: + target_fw = firmware + break + firmware = target_fw + logging.info("Target Firmware: \n" + firmware) + allure.attach(name="Target firmware : ", body=str(firmware)) + + target_revision = firmware['revision'].split("/")[1].replace(" ", "") + + # check the current AP Revision before upgrade + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + + # print and report the firmware versions before upgrade + allure.attach(name="Before Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info("current revision: " + current_version + "\ntarget revision: " + target_revision) + + # if AP is already in target Version then skip upgrade unless force upgrade is specified + if current_version == target_revision: + upgrade_status.append( + [self.device_under_tests_info[ap]['identifier'], target_revision, current_version, 'skip']) + logging.info("Skipping Upgrade! AP is already in target version") + allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") + break + + self.firmware_library_object.upgrade_firmware(serial=self.device_under_tests_info[ap]['identifier'], + url=str(firmware['uri'])) + # wait for 300 seconds after firmware upgrade + + logging.info("waiting for 300 Sec for Firmware Upgrade") + time.sleep(300) + + # check the current AP Revision again + ap_version = self.dut_library_object.get_ap_version(idx=ap) + current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] + # print and report the Firmware versions after upgrade + allure.attach(name="After Firmware Upgrade Request: ", + body="current revision: " + current_version + "\ntarget revision: " + target_revision) + logging.info("current revision: " + current_version + "\ntarget revision: " + target_revision) + if current_version == target_revision: + upgrade_status.append([target_revision, current_version]) + logging.info("firmware upgraded successfully: " + target_revision) + else: + upgrade_status.append([target_revision, current_version]) + logging.info("firmware upgraded failed: " + target_revision) + break + return upgrade_status + + def simulate_radar(self, idx=0): + """Simulate radar command for DFS""" + ret = self.dut_library_object.dfs(idx=idx) + return ret + + def get_dfs_logs(self, idx=0): + """Get the ap logs after Simulate radar command""" + logs = self.dut_library_object.dfs_logread(idx=idx) + return logs + + def reboot(self, idx=0): + """Reboot the AP""" + ret = self.dut_library_object.reboot(idx=idx) + return ret + + # def get_ap_status_logs(self): + # connected = 0 + # redirector_data = None + # for ap in range(len(self.device_under_tests_info)): + # connectivity_data = self.dut_library_object.run_generic_command(cmd="ubus call ucentral status", idx=ap) + # if "disconnected" in str(connectivity_data): + # print("AP in disconnected state, sleeping for 30 sec") + # # time.sleep(30) + # connected = 0 + # # # if i == 10: + # # print("rebooting AP") + # # ap_ssh.reboot() + # # print("sleep for 300 sec") + # # time.sleep(300) + # else: + # connected = 1 + # redirector_data = self.dut_library_object.run_generic_command(cmd="cat /etc/ucentral/redirector.json", idx=ap) + # return connected, redirector_data + # + # def get_ap_cloud_connectivity_status(self): + # status_data = [] + # self.ubus_connection = [] + # for ap in range(len(self.device_under_tests_info)): + # status = self.dut_library_object.ubus_call_ucentral_status() + # print(status) + # status_data.append(status) + # connectivity_data = self.dut_library_object.run_generic_command(cmd="ubus call ucentral status", idx=ap) + # self.ubus_connection.append(['Serial Number: ' + self.device_under_tests_info[ap]['serial'], + # connectivity_data]) + # return status_data + # + # def test_access_point(self, request): + # """used to check the manager status of AP, should be used as a setup to verify if ap can reach cloud""" + # status = self.get_ap_cloud_connectivity_status() + # + # def teardown_session(): + # data = [] + # data.append(False) + # for s in status: + # data.append(s[0]) + # print(data) + # if False not in data: + # pytest.exit("AP is Not connected to ucentral gw") + # allure.attach(name=str(status), body="") + # + # request.addfinalizer(teardown_session) + # yield status + +if __name__ == '__main__': + basic_shivam= { + "target": "tip_2x", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth3", + "lan_port": None, + "ssid": { + "mode": "BRIDGE", + "ssid_data": { + "0": { + "ssid": "ssid_wpa2_2g", + "encryption": "wpa2", + "password": "something", + "band": "fiveg", + "bssid": "90:3C:B3:6C:43:05" + }, + "1": { + "ssid": "ssid_wpa2_2g", + "encryption": "wpa2", + "password": "something", + "band": "twog", + "bssid": "90:3C:B3:6C:43:04" + } + }, + "radio_data": { + "2G": { + "channel": 1, + "bandwidth": 20, + "frequency": 2412 + }, + "5G": { + "channel": 52, + "bandwidth": 80, + "frequency": 5290 + }, + "6G": { + "channel": None, + "bandwidth": None, + "frequency": None + } + } + }, + "mode": "wifi6", + "identifier": "903cb36c4301", + "method": "serial", + "host_ip": "192.168.52.89", + "host_username": "lanforge", + "host_password": "lanforge", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyUSB0", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "192.168.52.89", + "http_port": 8080, + "ssh_port": 22, + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth3": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth2": { + "addressing": "static", + "ip": "192.168.52.150", + "gateway_ip": "192.168.52.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } + var = tip_2x(controller_data=basic_shivam["controller"], + device_under_tests_info=basic_shivam["device_under_tests"], + target=basic_shivam["target"]) + + # var.setup_objects() + setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [ + {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [ + {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal": [ + {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + + "rf": {}, + "radius": False + } + target = [['2G', 'wpa3_personal']] + d = var.setup_configuration_data(configuration=setup_params_enterprise, requested_combination=target) + d = var.setup_basic_configuration(configuration=setup_params_enterprise, requested_combination=target) + print(d) + # var.setup_firmware() + # var.teardown_objects() diff --git a/setup_env.bash b/setup_env.bash new file mode 100755 index 000000000..24faf9cea --- /dev/null +++ b/setup_env.bash @@ -0,0 +1,262 @@ +#!/bin/bash +# Setup python environment variable and pip environment variable like +# export PYTHON=/usr/bin/python3 +# export PIP=/usr/bin/pip3 +#sh setup_env.bash -t tip_2x -d all -n "Shivam Thakur" -o TIP -e shivam.thakur@candelatech.com -i "TIP OpenWIFI 2.X Library" +set -e + +helpFunction() +{ + echo "Open Wifi CICD Test Automation Installation" + echo "Usage: $0 -t target -d device " + echo -e "\t-t Target SDK (AP and/or controller Library) eg. tip_2x" + echo -e "\t-n Author Name eg. Shivam Thakur" + echo -e "\t-o Organization eg. tip_2x" + echo -e "\t-e Author Email Address eg. tip_2x" + echo -e "\t-i Description Info eg. tip_2x" + echo -e "\t-d Test Device Name eg. lanforge | perfecto | all" + echo + echo -e "Required environment variables:" + echo -e "\tPYTHON - full path to Python3 executable (minimal version is 3.8). Example value - /usr/bin/python3" + echo -e "\tPIP - full path to PIP3 executable. Example value - /usr/bin/pip3" + exit 1 # Exit script after printing help +} + +[[ -z ${PYTHON+x} ]] && echo "You must set the variable PYTHON in order to use this script." && echo && helpFunction && exit 1 +[[ -z ${PIP+x} ]] && echo "You must set the variable PIP in order to use this script." && echo && helpFunction && exit 1 + +while getopts "t:n:o:e:i:d:" opt +do + case "$opt" in + t ) target="$OPTARG" ;; + n ) author="$OPTARG" ;; + o ) org="$OPTARG" ;; + e ) email="$OPTARG" ;; + i ) description="$OPTARG" ;; + d ) device="$OPTARG" ;; + ? ) helpFunction ;; # Print helpFunction in case parameter is non-existent + esac +done + +# Print helpFunction in case parameters are empty +if [ -z "$target" ] || [ -z "$author" ] || [ -z "$org" ] || [ -z "$email" ] || [ -z "$description" ] || [ -z "$device" ] +then + echo "Some or all of the parameters are empty"; + helpFunction +fi + +# Begin script in case all parameters are correct +echo "Target SDK for " "$target" +echo "$device" + +# Check Python version and pip version +if ! hash $PYTHON; then + echo "python is not installed" + exit 1 +fi +x=$($PYTHON -V) +echo $x +ver=$([[ "$x" =~ "Python 3" ]] && echo "38") +echo $ver +#ver=$($PYTHON -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]\).*/\1\2/') +if [ "$ver" -lt "38" ]; then + echo "This script requires python 3.8 or greater" + exit 1 +fi + +if [ "$device" == "lanforge" ] || [ "$device" == "all" ] +then + if [ ! -d ../wlan-lanforge-scripts ] + then + cd .. + git clone https://github.com/Telecominfraproject/wlan-lanforge-scripts + cd wlan-lanforge-scripts + git checkout WIFI-1321-create-a-lan-forge-pip-module + cd ../wlan-testing/ + fi + if [ -d ../wlan-lanforge-scripts ] + then + cd ../wlan-lanforge-scripts + if [ -d ../lanforge_scripts ] + then + $PIP uninstall ../lanforge_scripts/dist/*.whl + rm -rf ../lanforge_scripts + fi + bash to_pip.sh + $PIP install ../lanforge_scripts/dist/*.whl #--force-reinstall + echo "Installed LANforge PIP Module" + cd ../wlan-testing/ + mkdir -p ~/.pip + echo "[global]" > ~/.pip/pip.conf + echo "index-url = https://pypi.org/simple" >> ~/.pip/pip.conf + echo "extra-index-url = https://tip-read:tip-read@tip.jfrog.io/artifactory/api/pypi/tip-wlan-python-pypi-local/simple" >> ~/.pip/pip.conf + $PIP install -r requirements.txt + rm -f tests/imports.py + touch tests/imports.py + if [ $target == "tip_2x" ] + then + cd libs/tip_2x + $PYTHON setup.py bdist_wheel + $PIP install dist/*.whl --force-reinstall + cd ../../ + fi + x=$(whoami) + echo -e "\"\"\"\nRegistered Target Imports\n\"\"\"\nimport sys\nimport importlib\n\nsys.path.append('/usr/local/bin')\n\nsys.path.append('/home/$x/.local//bin/')\n\nsys.path.append('/home/$x/.local/lib/python3.8/site-packages/')\n\n" >> tests/imports.py + echo -e "########################################################################################################################" >> tests/imports.py + echo -e "\"\"\" + Target Name:$target + Author Name:$author + Organization:$org + Register ID:1 + Email:$email + description:$description +\"\"\"" >> tests/imports.py + echo -e " +try: + target = importlib.import_module(\"tip_2x\") + target = target.tip_2x +except ImportError as e: + print(e) + sys.exit(\"Python Import Error: \" + str(e)) +" >> tests/imports.py + echo -e "########################################################################################################################" >> tests/imports.py + echo -e "########################################################################################################################" >> tests/imports.py + echo -e "\"\"\" + Target Name:lanforge_scripts + Author Name:$author + Organization:$org + Register ID:2 + Email:$email + description:Candela LANforge Based Library +\"\"\"" >> tests/imports.py + echo -e " +try: + lanforge_libs = importlib.import_module(\"lanforge_scripts.lf_libs.lf_libs\") + lf_libs = lanforge_libs.lf_libs + scp_file = lanforge_libs.SCP_File + lanforge_tests = importlib.import_module(\"lanforge_scripts.lf_libs.lf_tests\") + lf_tests = lanforge_tests.lf_tests +except ImportError as e: + print(e) + sys.exit(\"Python Import Error: \" + str(e)) +" >> tests/imports.py + echo -e "########################################################################################################################" >> tests/imports.py + cd libs/perfecto_interop + $PYTHON setup.py bdist_wheel + $PIP install dist/*.whl --force-reinstall + cd ../../ + echo -e "########################################################################################################################" >> tests/imports.py + echo -e "\"\"\" + Target Name:perfecto_interop + Author Name:$author + Organization:$org + Register ID:2 + Email:$email + description:Perfecto Based Interop Library +\"\"\"" >> tests/imports.py + echo -e " +try: + perfecto_interop = importlib.import_module(\"perfecto_interop\") + android_tests = perfecto_interop.android_tests + ios_tests = perfecto_interop.ios_tests +except ImportError as e: + print(e) + sys.exit(\"Python Import Error: \" + str(e)) +" >> tests/imports.py + echo -e "########################################################################################################################" >> tests/imports.py + fi +fi +WLAN_TESTING_PATH=$(pwd)"/tests/" +echo $WLAN_TESTING_PATH +rm -f tests/pytest.ini +touch tests/pytest.ini +echo -e "[pytest] +python_files = test_*.py setup_*.py +norecursedirs = .svn _build tmp* +addopts= --junitxml=test_everything.xml +log_format = %(asctime)s %(levelname)s %(message)s +log_date_format = %Y-%m-%d %H:%M:%S +;norecursedirs=out build +num_stations=1 +testpaths = + $WLAN_TESTING_PATH + +# Cloud SDK settings +sdk-customer-id=2 + +#fIRMWARE Option +firmware=0 + +# Radius Settings +radius_server_ip=192.168.200.75 +radius_port=1812 +radius_secret=testing123 + + +# Testrail Info +tr_url=https://telecominfraproject.testrail.com +tr_user=cicd@tip.com +tr_pass=Open$Wifi123 +tr_project_id=WLAN +tr_prefix=TIP_ +milestone=29 + + + +filterwarnings=ignore::UserWarning + + +markers = + ; Test Suites, It Contains + ow_sanity_lf: OpenWifi Sanity Test Plan + ow_performance_lf: OpenWifi Performance Test Plan + ow_sanity_interop: OpenWifi Sanity with Interop + + ; Test Suites, It Contains + client_connect_tests: Client Connect Test Cases with bridge|nat|vlan modes across 2.4|5|6 GHz bands with Various Encryptions + client_connectivity_tests: Client Connectivity Test Cases with bridge|nat|vlan modes across 2.4|5|6 GHz bands with Various Encryptions + dfs_tests: Dynamic Frequency Selection Test Cases + multi_psk_tests: Multi PSK Test Cases + rate_limiting_tests: Rate Limiting Test Cases + dvlan_tests: Dynamic VLAN Test Cases + dynamic_qos_tests: Dynamic QOS Test Cases + multi_vlan_tests: Multi VLAN Combination based Test Cases + + client_scale_tests: Client Capacity Tests with maximum possible Stations bridge|nat|vlan 2.4|5|6 GHz Bands + peak_throughput_tests: Single Client Peak Performance Test with various Bandwidths across 2.4|5|6 GHz Bands with various Client Types + dataplane_tests: Single Client Throughput Test with various pkt sizes with UL|DL|BI with AC|AX Client Types across 2.4|5|6 GHz Bands + multi_band_tests: Multi Band Performance Test on bridge|nat|vlan mode with Single Client on each of the 2.4|5|6 GHz Bands + + rate_vs_range_tests: Rate verses Range Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + rate_vs_orientation_tests: Rate verses Orientation Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + rx_sensitivity_tests: Receiver Sensitivity Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + spatial_consistency_tests: Spatial Consistency Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + multi_assoc_disassoc_tests: Multi Association and Disassociation Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + multi_station_performance_tests: Multi Station Performance Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + mu_mimo_performance_tests: Multi User MIMO Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + ofdma_tests: OFDMA Tests with Various Combinations bridge|nat|vlan 2.4|5|6 GHz Bands + + + ; Supported Markers + bridge: Use this marker to run bridge mode tests in each of the above test plans/suites + nat: Use this marker to run nat mode tests in each of the above test plans/suites + vlan: Use this marker to run vlan mode tests in each of the above test plans/suites + + twog: Use this marker to run 2.4 GHz tests in each of the above test plans/suites + fiveg: Use this marker to run 5 GHz tests in each of the above test plans/suites + sixg: Use this marker to run 6 GHz tests in each of the above test plans/suites + + open: Use this marker to run open Encryption tests in each of the above test plans/suites + wpa: Use this marker to run wpa Encryption tests in each of the above test plans/suites + wpa2_personal: Use this marker to run wpa2_personal Encryption tests in each of the above test plans/suites + wpa3_personal: Use this marker to run wpa3_personal Encryption tests in each of the above test plans/suites + wpa3_personal_mixed: Use this marker to run wpa3_personal_mixed Encryption tests in each of the above test plans/suites + wpa_wpa2_personal_mixed: Use this marker to run wpa_wpa2_personal_mixed Encryption tests in each of the above test plans/suites + + wpa_enterprise: Use this marker to run wpa_enterprise Encryption tests in each of the above test plans/suites + wpa2_enterprise: Use this marker to run wpa2_enterprise Encryption tests in each of the above test plans/suites + wpa3_enterprise: Use this marker to run wpa3_enterprise Encryption tests in each of the above test plans/suites + wpa_wpa2_enterprise_mixed: Use this marker to run wpa_wpa2_enterprise_mixed Encryption tests in each of the above test plans/suites + wpa3_enterprise_mixed: Use this marker to run wpa3_enterprise_mixed Encryption tests in each of the above test plans/suites +" >> tests/pytest.ini + diff --git a/setup_tunnel.bash b/setup_tunnel.bash new file mode 100644 index 000000000..5c0972a75 --- /dev/null +++ b/setup_tunnel.bash @@ -0,0 +1,1314 @@ +#!/usr/bin/bash +# Setup python environment variable and pip environment variable like +# export PYTHON=/usr/bin/python3 +# export PIP=/usr/bin/pip3 +#sh setup_env.bash -t tip_2x -d all -n "Shivam Thakur" -o TIP -e shivam.thakur@candelatech.com -i "TIP OpenWIFI 2.X Library" +helpFunction() +{ + echo "Setup SSH Tunnel for TIP Labs" + echo "Usage: $0 -l lab " + echo -e "\t-l Target Lab basic-01 | basic-02 | basic-03 | basic-04 | basic-05 | basic-06 | basic-07 | basic-08 | advance-01 | advance-02 | advance-03" + exit 1 # Exit script after printing help +} + +basic1_8080=8800 +basic1_22=8801 +basic1_lab_ctlr=8802 +basic1_vnc=8803 + +basic2_8080=8810 +basic2_22=8811 +basic2_lab_ctlr=8812 +basic2_vnc=8813 + +basic3_8080=8820 +basic3_22=8821 +basic3_lab_ctlr=8822 +basic3_vnc=8823 + +basic4_8080=8830 +basic4_22=8831 +basic4_lab_ctlr=8832 +basic4_vnc=8833 + +basic5_8080=8840 +basic5_22=8841 +basic5_lab_ctlr=8842 +basic5_vnc=8843 + +basic6_8080=8850 +basic6_22=8851 +basic6_lab_ctlr=8852 +basic6_vnc=8853 + +basic7_8080=8860 +basic7_22=8861 +basic7_lab_ctlr=8862 +basic7_vnc=8863 + + +basic8_8080=8870 +basic8_22=8871 +basic8_lab_ctlr=8872 +basic8_vnc=8873 + +advance1_8080=8880 +advance1_22=8881 +advance1_lab_ctlr=8882 +advance1_vnc=8883 + +advance2_8080=8890 +advance2_22=8891 +advance2_lab_ctlr=8892 +advance2_vnc=8893 + +advance3_8080=8900 +advance3_22=8901 +advance3_lab_ctlr=8902 +advance3_vnc=8903 +Create_lab_info_json() +{ + rm tests/lab_info.json + touch lab_info.json + # shellcheck disable=SC2016 + echo -e ' + { + +"CONFIGURATION" : { + "basic-01" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "wallys_dr40x9", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "c44bd1a022c1", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic1_lab_ctlr ', + "serial_tty": "/dev/ttyAP8", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $basic1_8080 ', + "ssh_port": ' $basic1_22 ', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.6", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-02" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "hfcl_ion4", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "0006aee53b84", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic2_lab_ctlr ' , + "serial_tty": "/dev/ttyAP11", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $basic2_8080 ', + "ssh_port": ' $basic2_22 ', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.7", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-03" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "tp-link_ec420-g1", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": "1.1.eth1", + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "001122090801", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic3_lab_ctlr ' , + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $basic3_8080 ', + "ssh_port": ' $basic3_22 ', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + "1.1.eth1" : { + "addressing": "dynamic" + } + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.8", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-03a" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "indio_um-305ac", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": "1.1.eth1", + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "706dec0a8a79", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic3_lab_ctlr ' , + "serial_tty": "/dev/ttyAP6", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $basic3_8080 ', + "ssh_port": ' $basic3_22 ', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + "1.1.eth1" : { + "addressing": "dynamic" + } + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.8", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-04" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_ecw5211", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": "1.1.eth1", + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "68215fda456d", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic4_lab_ctlr ', + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port":' $basic4_8080', + "ssh_port":' $basic4_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + "1.1.eth1" : { + "addressing": "dynamic" + } + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.9", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-04a" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "hfcl_ion4xi", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": "1.1.eth1", + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi5", + "identifier": "0006ae6df11f", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $basic4_lab_ctlr ', + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port":' $basic4_8080', + "ssh_port":' $basic4_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + "1.1.eth1" : { + "addressing": "dynamic" + } + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.9", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-05" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf188n", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "0000c1018812", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port":' $basic5_lab_ctlr', + "serial_tty": "/dev/ttyAP1", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port":' $basic5_8080', + "ssh_port":' $basic5_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth1": { + "addressing": "static", + "ip": "10.28.2.16", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-06" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_eap102", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb39d6918", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port":' $basic6_lab_ctlr', + "serial_tty": "/dev/ttyAP2", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port":' $basic6_8080', + "ssh_port":' $basic6_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.17", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-07" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_eap101", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb36ae4a8", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port":' $basic7_lab_ctlr', + "serial_tty": "/dev/ttyAP3", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port":' $basic7_8080', + "ssh_port":' $basic7_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.18", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-08" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "liteon-wpx8324", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": {}, + "mode": "wifi6", + "identifier": "e8c74f202600", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": '$basic8_lab_ctlr', + "serial_tty": "/dev/ttyAP5", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": '$basic8_8080', + "ssh_port": '$basic8_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.19", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "basic-08a" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "udaya_a5-id2", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth2", + "lan_port": null, + "ssid": {}, + "mode": "wifi5", + "identifier": "50987100327b", + "method": "serial", + "host_ip": "10.28.3.103", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": '$basic8_lab_ctlr', + "serial_tty": "/dev/ttyAP6", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": '$basic8_8080', + "ssh_port": '$basic8_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.19", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "advance-01" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_194c4", + "supported_bands": ["2G", "5G", "6G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth1", + "lan_port": null, + "ssid": {}, + "mode": "wifi6", + "identifier": "f40b9fe78e03", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": '$advance1_lab_ctlr', + "serial_tty": "/dev/ttyAP2", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": '$advance1_8080', + "ssh_port": '$advance1_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth1": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.15", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "advance-02" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "edgecore_eap102", + "supported_bands": ["2G", "5G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.1.eth1", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6", + "identifier": "903cb39d6958", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port": ' $advance2_lab_ctlr', + "serial_tty": "/dev/ttyAP3", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $advance2_8080', + "ssh_port": ' $advance2_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.1.eth1": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.1.eth3": { + "addressing": "static", + "ip": "10.28.2.14", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + }, + "advance-03" : { + "target": "tip_2x", + "controller" : { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [{ + "model": "cig_wf196", + "supported_bands": ["2G", "5G", "6G"], + "supported_modes": ["BRIDGE", "NAT", "VLAN"], + "wan_port": "1.3.eth2", + "lan_port": null, + "ssid": { + "2g-ssid": "OpenWifi", + "5g-ssid": "OpenWifi", + "6g-ssid": "OpenWifi", + "2g-password": "OpenWifi", + "5g-password": "OpenWifi", + "6g-password": "OpenWifi", + "2g-encryption": "WPA2", + "5g-encryption": "WPA2", + "6g-encryption": "WPA3", + "2g-bssid": "68:7d:b4:5f:5c:31", + "5g-bssid": "68:7d:b4:5f:5c:3c", + "6g-bssid": "68:7d:b4:5f:5c:38" + }, + "mode": "wifi6e", + "identifier": "824f816011e4", + "method": "serial", + "host_ip": "localhost", + "host_username": "lanforge", + "host_password": "pumpkin77", + "host_ssh_port":' $advance3_lab_ctlr', + "serial_tty": "/dev/ttyAP0", + "firmware_version": "next-latest" + }], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "localhost", + "http_port": ' $advance3_8080', + "ssh_port": ' $advance3_22', + "setup": {"method": "build", "DB": "Test_Scenario_Automation"}, + "wan_ports": { + "1.3.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } + } + }, + "lan_ports": { + + }, + "uplink_nat_ports": { + "1.3.eth3": { + "addressing": "static", + "ip": "10.28.2.39", + "gateway_ip": "10.28.2.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" + } + } + } + } + } +}, + +"PERFECTO_DETAILS" : { + "securityToken":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + "projectName": "TIP-PyTest-Execution", + "projectVersion": "1.0", + "reportTags": "TestTag", + "perfectoURL":"tip", + "available_devices": [""], + "iPhone-11": { + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 + }, + "iPhone-12": { + "model-iOS": "iPhone-12", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-12", + "jobNumber": 38 + }, + "iPhone-7": { + "model-iOS": "iPhone-7", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-7", + "jobNumber": 38 + }, + "iPhone-XR": { + "model-iOS": "iPhone-XR", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-XR", + "jobNumber": 38 + }, + "Galaxy S20": { + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 + }, + "Galaxy S10.*": { + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10", + "jobNumber": 38 + }, + "Galaxy S9": { + "platformName-android": "Android", + "model-android": "Galaxy S9", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S9", + "jobNumber": 38 + }, + "Pixel 4": { + "platformName-android": "Android", + "model-android": "Pixel 4", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-pixel-4", + "jobNumber": 38 + } +}, +"RADIUS_SERVER_DATA" : { + "ip": "10.28.3.100", + "port": 1812, + "secret": "testing123", + "user": "nolaradius", + "password": "nolastart", + "pk_password": "whatever" +}, + +"RADIUS_ACCOUNTING_DATA" : { + "ip": "10.10.1.221", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" +}, + +"DYNAMIC_VLAN_RADIUS_SERVER_DATA" : { + "ip": "3.20.165.131", + "port": 1812, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" +}, + +"DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA" : { + "ip": "3.20.165.131", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" +}, + +"RATE_LIMITING_RADIUS_SERVER_DATA" : { + "ip": "10.28.3.100", + "port": 1812, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" +}, + +"RATE_LIMITING_RADIUS_ACCOUNTING_DATA" : { + "ip": "10.28.3.100", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" +}, + +"PASSPOINT_RADIUS_SERVER_DATA" : { + "ip": "52.234.179.191", + "port": 11812, + "secret": "yeababy20!", + "user": "nolaradius", + "password": "nolastart", + "pk_password": "whatever" +}, + +"PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA" : { + "ip": "52.234.179.191", + "port": 11813, + "secret": "yeababy20!" +}, + +"PASSPOINT": { + "venue-name": [ + "eng:Example passpoint_venue", + "fra:Exemple de lieu" + ], + "domain-name": [ + "onboard.almondlabs.net", + "test.com" + ], + "asra": false, + "internet": true, + "esr": false, + "uesa": false, + "access-network-type": 0, + "hessid": "11:22:33:44:55:66", + "venue-group": 2, + "venue-type": 8, + "connection-capability": [ + "1:0:2", + "6:22:1", + "17:5060:0" + ], + "roaming-consortium": [ + "F4F5E8F5F4", + "BAA2D00100", + "BAA2D00000", + "DEADBEEF01" + ], + "disable-dgaf": true, + "anqp-domain": 8888, + "ipaddr-type-available": 14, + "nai-realm": [ + "0,oss.ameriband.com,21[5:7][2:4],13[5:-1]", + "0,test.com,21[5:7][2:4]" + ], + "osen": false, + "anqp-3gpp-cell-net": [ + "310,260", + "310,410" + ], + "friendly-name": [ + "eng:AlmondLabs", + "fra:AlmondLabs" + ], + "venue-url": [ + "http://www.example.com/info-fra", + "http://www.example.com/info-eng" + ], + "auth-type": { + "type": "terms-and-conditions" + } +}, +"open_flow":{}, + +"influx_params" : {} + +} ' >> tests/lab_info.json + + + +} +while getopts "l:" opt +do + case "$opt" in + l ) lab="$OPTARG" ;; + ? ) helpFunction ;; # Print helpFunction in case parameter is non-existent + esac +done + +# Print helpFunction in case parameters are empty +if [ -z "$lab" ] +then + echo "Some or all of the parameters are empty"; + helpFunction +fi +if [ "$lab" = "basic-01" ]; then + echo "Initiating LAB Connection in basic-01" + + Create_lab_info_json + ssh -C -L 8800:10.28.3.6:8080 -L 8801:10.28.3.6:22 -L 8802:10.28.3.100:22 -L 8803:10.28.3.6:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-02" ]; then + echo "Initiating LAB Connection in basic-02" + Create_lab_info_json + ssh -C -L 8810:10.28.3.8:8080 -L 8811:10.28.3.8:22 -L 8812:10.28.3.100:22 -L 8813:10.28.3.8:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-03" ] || [ "$lab" = "basic-03a" ]; then + echo "Initiating LAB Connection in basic-03" + Create_lab_info_json + ssh -C -L 8820:10.28.3.10:8080 -L 8821:10.28.3.10:22 -L 8822:10.28.3.100:22 -L 8823:10.28.3.10:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-04" ] || [ "$lab" = "basic-04a" ] ; then + echo "Initiating LAB Connection in basic-04" + Create_lab_info_json + ssh -C -L 8830:10.28.3.12:8080 -L 8831:10.28.3.12:22 -L 8832:10.28.3.100:22 -L 8833:10.28.3.12:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-05" ]; then + echo "Initiating LAB Connection in basic-05" + Create_lab_info_json + ssh -C -L 8840:10.28.3.28:8080 -L 8841:10.28.3.28:22 -L 8842:10.28.3.103:22 -L 8843:10.28.3.28:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-06" ]; then + echo "Initiating LAB Connection in basic-06" + Create_lab_info_json + ssh -C -L 8850:10.28.3.30:8080 -L 8851:10.28.3.30:22 -L 8852:10.28.3.103:22 -L 8853:10.28.3.30:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-07" ]; then + echo "Initiating LAB Connection in basic-07" + Create_lab_info_json + ssh -C -L 8860:10.28.3.32:8080 -L 8861:10.28.3.32:22 -L 8862:10.28.3.103:22 -L 8863:10.28.3.32:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "basic-08" ]; then + echo "Initiating LAB Connection in basic-08" + Create_lab_info_json + ssh -C -L 8870:10.28.3.34:8080 -L 8871:10.28.3.34:22 -L 8872:10.28.3.103:22 -L 8873:10.28.3.34:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "advance-01" ]; then + echo "Initiating LAB Connection in advance-01" + Create_lab_info_json + ssh -C -L 8880:10.28.3.24:8080 -L 8881:10.28.3.24:22 -L 8882:10.28.3.102:22 -L 8883:10.28.3.24:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "advance-02" ]; then + echo "Initiating LAB Connection in advance-02" + Create_lab_info_json + ssh -C -L 8890:10.28.3.26:8080 -L 8801:10.28.3.26:22 -L 8892:10.28.3.102:22 -L 8893:10.28.3.26:5901 ubuntu@3.130.51.163 +fi +if [ "$lab" = "advance-03" ]; then + echo "Initiating LAB Connection in advance-03" + Create_lab_info_json + ssh -C -L 8900:10.28.3.117:8080 -L 8901:10.28.3.117:22 -L 8902:10.28.3.115:22 -L 8903:10.28.3.117:5901 ubuntu@3.130.51.163 +else + echo "Testbed is Not Available" +fi + + diff --git a/sync_repos.bash b/sync_repos.bash deleted file mode 100755 index 37b599890..000000000 --- a/sync_repos.bash +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Copy wlan-lanforge-scripts into place -# Assumes wlan-lanforge-scripts is already up to date. -# Other setup may be added here as well. - -if [ -d ../wlan-lanforge-scripts ] -then - rm -fr lanforge/lanforge-scripts - - cp -a ../wlan-lanforge-scripts lanforge/lanforge-scripts -fi - diff --git a/tests/configuration.py b/tests/configuration.py index 4aa49ed35..e84c0164a 100644 --- a/tests/configuration.py +++ b/tests/configuration.py @@ -55,13 +55,7 @@ PASSPOINT_RADIUS_SERVER_DATA = data["PASSPOINT_RADIUS_SERVER_DATA"] PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA = data["PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA"] -PASSPOINT_PROVIDER_INFO = data["PASSPOINT_PROVIDER_INFO"] - -PASSPOINT_OPERATOR_INFO = data["PASSPOINT_OPERATOR_INFO"] - -PASSPOINT_VENUE_INFO = data["PASSPOINT_VENUE_INFO"] - -PASSPOINT_PROFILE_INFO = data["PASSPOINT_PROFILE_INFO"] +PASSPOINT = data["PASSPOINT"] open_flow = data["open_flow"] diff --git a/tests/conftest.py b/tests/conftest.py index 8f9ec4b0a..e1fddf75a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,140 +1,53 @@ -""" - Pytest fixtures: High level Resource Management and base setup fixtures -""" -import datetime +import json +import logging import os -import random +import re import string import sys -import re +import random import allure - -ALLURE_ENVIRONMENT_PROPERTIES_FILE = 'environment.properties' -ALLUREDIR_OPTION = '--alluredir' - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') -for folder in 'py-json', 'py-scripts': - if folder not in sys.path: - sys.path.append(f'../lanforge/lanforge-scripts/{folder}') - -sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") - -sys.path.append(f'../libs') -sys.path.append(f'../libs/lanforge/') - -from LANforge.LFUtils import * - -if 'py-json' not in sys.path: - sys.path.append('../py-scripts') -from apnos.apnos import APNOS -from controller.controller_1x.controller import FirmwareUtility import pytest -from lanforge.lf_tests import RunTest -from cv_test_manager import cv_test -from configuration import influx_params -from configuration import CONFIGURATION -from configuration import PERFECTO_DETAILS -from configuration import open_flow -from configuration import RADIUS_SERVER_DATA -from configuration import RADIUS_ACCOUNTING_DATA -from configuration import RATE_LIMITING_RADIUS_SERVER_DATA -from configuration import RATE_LIMITING_RADIUS_ACCOUNTING_DATA -from lanforge.scp_util import SCP_File -from testrails.testrail_api import APIClient -from testrails.reporting import Reporting -from lf_tools import ChamberView -from libs.lanforge.pull_report import Report -from os import path +from _pytest.fixtures import SubRequest from typing import Any, Callable, Optional -from _pytest.fixtures import SubRequest -from pytest import fixture - -from fixtures_1x import Fixtures_1x -from fixtures_2x import Fixtures_2x -from fixtures_3x import Fixtures_3x -from controller.controller_3x.controller import CController - ALLURE_ENVIRONMENT_PROPERTIES_FILE = 'environment.properties' ALLUREDIR_OPTION = '--alluredir' -import logging -LOGGER = logging.getLogger(__name__) +logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) +log_filename = "logs/pytest_logs.log" +os.makedirs(os.path.dirname(log_filename), exist_ok=True) +file_handler = logging.FileHandler(log_filename, mode="w", encoding=None, delay=False) + +try: + import importlib + + # sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../"))) + sys.path.append("../tests") + + imports = importlib.import_module("imports") + target = imports.target + lf_libs = imports.lf_libs + lf_tests = imports.lf_tests + scp_file = imports.scp_file + perfecto_interop = imports.perfecto_interop + android_tests = imports.android_tests + ios_tests = imports.ios_tests + configuration = importlib.import_module("configuration") + CONFIGURATION = configuration.CONFIGURATION + PERFECTO_DETAILS = configuration.PERFECTO_DETAILS + # cv_test_manager = importlib.import_module("py-json.cv_test_manager") + # cv_test = cv_test_manager.cv_test +except ImportError as e: + print(e) + sys.exit("Python Import Error: " + str(e)) def pytest_addoption(parser): """pytest addoption function: contains ini objects and options""" - parser.addini("tr_url", "Test Rail URL") - parser.addini("tr_prefix", "Test Rail Prefix (Generally Testbed_name_)") - parser.addini("tr_user", "Testrail Username") - parser.addini("tr_pass", "Testrail Password") - parser.addini("tr_project_id", "Testrail Project ID") - parser.addini("milestone", "milestone Id") - + parser.addini("controller_url", type='string', help="controller_url_parameter_override", default="0") parser.addini(name="firmware", type='string', help="AP Firmware build URL", default="0") - parser.addini("cloud_ctlr", "AP Firmware build URL", default="0") - parser.addini("num_stations", "Number of Stations/Clients for testing") - - # change behaviour - parser.addoption( - "--skip-upgrade", - action="store_true", - default=False, - help="skip updating firmware on the AP (useful for local testing)" - ) - parser.addoption( - "--skip-env", - action="store_true", - default=False, - help="skip adding to env data" - ) - - parser.addoption( - "--skip-lanforge", - action="store_true", - default=False, - help="skip to do any interactions on lanforge (to be used in case of interop)" - ) - - # change behaviour - parser.addoption( - "--exit-on-fail", - action="store_true", - default=False, - help="skip updating firmware on the AP (useful for local testing)" - ) - - # change to Ucentral Ctlr - parser.addoption( - "--1.x", - action="store_true", - default=False, - help="Option to run Test Cases on 1.x SDK" - ) - - # change behaviour - parser.addoption( - "--force-upgrade", - action="store_true", - default=False, - help="force Upgrading Firmware even if it is already latest version" - ) - parser.addoption( - "--force-upload", - action="store_true", - default=False, - help="force Uploading Firmware even if it is already latest version" - ) - # this has to be the last argument - # example: --access-points ECW5410 EA8300-EU parser.addoption( "--testbed", # nargs="+", @@ -142,104 +55,123 @@ def pytest_addoption(parser): help="AP Model which is needed to test" ) parser.addoption( - "--use-testrail", - action="store_false", - default=True, - help="Stop using Testrails" + "--num_stations", + default=1, + help="Number of Stations" + ) + parser.addoption( + "--max_stations", + default=64, + help=" Max Number of Stations of AP" + ) + parser.addoption( + "--device", + # nargs="+", + default="lanforge", + help="Test Traffic Generator which can be used, lanforge | perfecto" ) parser.addoption( "--run-lf", action="store_true", default=False, - help="skip cloud controller and AP, run only lanforge tests on a ssid preconfigured" + help="Test Traffic Generator which can be used, lanforge | perfecto" ) parser.addoption( - "--cc.1", + "--skip-lf", action="store_true", default=False, - help="Option to run Test Cases on cc version 1" - + help="Skips the Lanforge Usage" ) parser.addoption( - "--roaming_delay", - default=1, - help="Roaming delay interval" - ) - parser.addoption( - "--iteration", - default=1, - help="Roaming iterations" - ) - parser.addoption( - "--duration", - default=1, - help="Roaming duration in minutes" - ) - parser.addoption( - "--client", - default=1, - help="Number of clients to be created" - ) - parser.addoption( - "--skip-pcap", + "--skip-all", action="store_true", default=False, - help="skip packet capture for sanity" + help="Skips the Lanforge Usage" + ) + + parser.addoption( + "--skip-env", + action="store_true", + default=False, + help="skip adding to env data" ) parser.addoption( - "--device", - default="iPhone-11", - help="Device Model which is needed to test" + "--client-type", + default="ac", + help="Select the client type for test ac | ax" ) - # Perfecto Parameters - parser.addini("perfectoURL", "Cloud URL") - parser.addini("securityToken", "Security Token") - parser.addini("platformName-iOS", "iOS Platform") - parser.addini("platformName-android", "Android Platform") - parser.addini("model-iOS", "iOS Devices") - parser.addini("model-android", "Android Devices") - parser.addini("bundleId-iOS", "iOS Devices") - parser.addini("bundleId-iOS-Settings", "iOS Settings App") - parser.addini("appPackage-android", "Android Devices") - parser.addini("bundleId-iOS-Safari", "Safari BundleID") - parser.addini("wifi-SSID-2g-Pwd", "Wifi 2g Password") - parser.addini("Default-SSID-5gl-perfecto-b", "Wifi 5g AP Name") - parser.addini("Default-SSID-2g-perfecto-b", "Wifi 2g AP Name") - parser.addini("Default-SSID-perfecto-b", "Wifi AP Name") - parser.addini("bundleId-iOS-Ping", "Ping Bundle ID") - parser.addini("browserType-iOS", "Mobile Browser Name") - parser.addini("projectName", "Project Name") - parser.addini("projectVersion", "Project Version") - parser.addini("jobName", "CI Job Name") - parser.addini("jobNumber", "CI Job Number") - parser.addini("reportTags", "Report Tags") parser.addoption( - "--access-points-perfecto", - # nargs="+", - default=["Perfecto"], - help="list of access points to test" + "--use-perfecto-android", + action="store_true", + default=False, + help="Use Interop Android Test Package for tests" ) + parser.addoption( + "--use-perfecto-ios", + action="store_true", + default=False, + help="Use Interop IoS Test Package for tests" + ) -""" -Test session base fixture -""" - - -# To be depreciated as testrails will go -@pytest.fixture(scope="session") -def test_cases(): - """Yields the test cases from configuration.py: will be depreciated""" - yield [] + parser.addoption( + "--port", + default=False, + help="Select the port for AP Up Down tests" + ) @pytest.fixture(scope="session") -def testbed(request): +def get_lab_info(): + yield configuration + + +@pytest.fixture(scope="session") +def run_lf(request): """yields the testbed option selection""" - var = request.config.getoption("--testbed") - allure.attach(name="testbed name", body=var) - yield var + run_lf = request.config.getoption("--run-lf") + yield run_lf + + +@pytest.fixture(scope="session") +def skip_lf(request): + """yields the testbed option selection""" + skip_lf = request.config.getoption("--skip-lf") + yield skip_lf + + +@pytest.fixture(scope="session") +def selected_testbed(request): + """yields the testbed option selection""" + current_testbed = request.config.getoption("--testbed") + yield current_testbed + + +@pytest.fixture(scope="session") +def selected_port(request): + """yields the port option selection""" + current_port = request.config.getoption("--port") + yield current_port + + +@pytest.fixture(scope="session") +def num_stations(request): + """yields the testbed option selection""" + num_stations = request.config.getoption("--num_stations") + yield int(num_stations) + + +@pytest.fixture(scope="session") +def max_stations(request): + """yields the max stations supported by AP""" + if run_lf: + """User will give max stations for run_lf""" + max_stations = request.config.getoption("--max_stations") + else: + """Fetch max stations from AP""" + max_stations = 64 + yield int(max_stations) @pytest.fixture(scope="session") @@ -249,390 +181,22 @@ def device(request): yield var -@pytest.fixture(scope="session") -def should_upload_firmware(request): - """yields the --force-upload option for firmware upload selection""" - yield request.config.getoption("--force-upload") - - -@pytest.fixture(scope="session") -def run_lf(request): - """yields the --run-lf option for skipping configuration on AP and using Cloud controller""" - var = request.config.getoption("--run-lf") - yield var - - -@pytest.fixture(scope="session") -def cc_1(request): - """yields the --cc.1 option for skipping configuration on AP and using Cloud controller of available framework""" - var = request.config.getoption("--cc.1") - yield var - - -@pytest.fixture(scope="session") -def roaming_delay(request): - """yields the --roaming_delay option """ - var = request.config.getoption("--roaming_delay") - allure.attach(name="roaming delay provided in seconds", body=str(var)) - yield var - - -@pytest.fixture(scope="session") -def iteration(request): - """yields the --iteration option for a test to provide how frequenty roam should happen """ - var = request.config.getoption("--iteration") - allure.attach(name="iteration", body=var) - yield var - - -@pytest.fixture(scope="session") -def duration(request): - """yields the --duration option for a test to provide how long roam should happen """ - var = request.config.getoption("--duration") - allure.attach(name="duration in minutes", body=str(var)) - yield var - - -@pytest.fixture(scope="session") -def client(request): - """yields the --client option for getting user specified client number""" - var = request.config.getoption("--client") - allure.attach(name="number of clients", body=var) - yield var - - -@pytest.fixture(scope="session") -def skip_pcap(request): - """yields the --skip-pcap option for skipping the packet capture for sanity""" - var = request.config.getoption("--skip-pcap") - yield var - - -@pytest.fixture(scope="session") -def should_upgrade_firmware(request): - """yields the --force-upgrade option for firmware upgrade selection""" - yield request.config.getoption("--force-upgrade") - - -@pytest.fixture(scope="session") -def exit_on_fail(request): - """yields the --exit-on-fail option for exiting the test case if it fails without teardown""" - yield request.config.getoption("--exit-on-fail") - - -@pytest.fixture(scope="session") -def radius_info(): - """yields the radius server information from lab info file""" - yield RADIUS_SERVER_DATA - - -@pytest.fixture(scope="session") -def radius_accounting_info(): - """yields the radius accounting information from lab info file""" - yield RADIUS_ACCOUNTING_DATA - - -@pytest.fixture(scope="session") -def rate_radius_info(): - """yields the radius server information from lab info file""" - yield RATE_LIMITING_RADIUS_SERVER_DATA - - -@pytest.fixture(scope="session") -def rate_radius_accounting_info(): - """yields the radius accounting information from lab info file""" - yield RATE_LIMITING_RADIUS_ACCOUNTING_DATA - - -@pytest.fixture(scope="session") -def get_configuration(testbed, request): - """yields the selected testbed information from lab info file (configuration.py)""" - if request.config.getini("cloud_ctlr") != "0": - CONFIGURATION[testbed]["controller"]["url"] = request.config.getini("cloud_ctlr") - if request.config.getini("firmware") != "0": - version = request.config.getini("firmware") - version_list = version.split(",") - for i in range(len(CONFIGURATION[testbed]["access_point"])): - CONFIGURATION[testbed]["access_point"][i]["version"] = version_list[0] - LOGGER.info("Selected the lab Info data: " + str((CONFIGURATION[testbed]))) - yield CONFIGURATION[testbed] - - @pytest.fixture(scope="session") def get_device_configuration(device, request): """yields the selected device information from lab info file (configuration.py)""" - - LOGGER.info("Selected the lab Info data: " + str((PERFECTO_DETAILS[device]))) - print(PERFECTO_DETAILS[device]) - yield PERFECTO_DETAILS[device] - - -@pytest.fixture(scope="session") -def get_apnos(): - """yields the LIBRARY for APNOS, Reduces the use of imports across files""" - yield APNOS - - -@pytest.fixture(scope="session") -def get_equipment_ref(request, setup_controller, testbed, get_configuration): - """""" - if request.config.getoption("1.x"): - equipment_id_list = [] - for i in get_configuration['access_point']: - equipment_id_list.append(setup_controller.get_equipment_id( - serial_number=i['serial'])) + if device != "lanforge": + logging.info("Selected the lab Info data: " + str((PERFECTO_DETAILS[device]))) + print(PERFECTO_DETAILS[device]) + yield PERFECTO_DETAILS[device] else: - equipment_id_list = [] - for i in get_configuration['access_point']: - equipment_id_list.append(i['serial']) - yield equipment_id_list + yield "" @pytest.fixture(scope="session") -def get_sdk_version(fixtures_ver, run_lf, cc_1): - version = "" - if not run_lf and not cc_1: - version = fixtures_ver.get_sdk_version() - print(version) - yield version - - -@pytest.fixture(scope="session") -def get_uci_show(fixtures_ver, get_apnos, get_configuration): - uci_show = fixtures_ver.get_uci_show(get_apnos, get_configuration) - yield uci_show - - -@pytest.fixture(scope="session") -def get_ap_version(fixtures_ver, get_apnos, get_configuration, cc_1): - if not cc_1: - ap_version = fixtures_ver.get_ap_version(get_apnos, get_configuration) - yield ap_version - else: - yield True - - -@pytest.fixture(scope="session") -def skip_lf(request): - yield request.config.getoption("--skip-lanforge") - - -@pytest.fixture(scope="session") -def get_openflow(): - yield open_flow - - -# Controller Fixture -@pytest.fixture(scope="session") -def setup_controller(request, get_configuration, add_env_properties, fixtures_ver): - """sets up the controller connection and yields the sdk_client object""" - sdk_client = fixtures_ver.controller_obj - if not cc_1: - request.addfinalizer(fixtures_ver.disconnect) - yield sdk_client - - -# Prov Controller Fixture -@pytest.fixture(scope="session") -def setup_prov_controller(request, get_configuration, add_env_properties, fixtures_ver): - """sets up the prov controller connection and yields the sdk_client object""" - sdk_client = fixtures_ver.prov_controller_obj - request.addfinalizer(fixtures_ver.disconnect) - yield sdk_client - - -@pytest.fixture(scope="session") -def setup_firmware(setup_controller): - """ Fixture to Setup Firmware with the selected sdk """ - setup_controller.instantiate_firmware() - yield True - - -@pytest.fixture(scope="session") -def instantiate_firmware(request, setup_controller, get_configuration): - """sets up firmware utility and yields the object for firmware upgrade""" - if request.config.getoption("--1.x"): - firmware_client_obj = [] - - for access_point_info in get_configuration['access_point']: - version = access_point_info["version"] - if request.config.getini("build").__contains__("https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/"): - version = request.config.getini("build") - firmware_client = FirmwareUtility(sdk_client=setup_controller, - model=access_point_info["model"], - version_url=version) - firmware_client_obj.append(firmware_client) - yield firmware_client_obj - else: - # 2.x - pass - - -@pytest.fixture(scope="session") -def get_latest_firmware(request, instantiate_firmware): - """yields the list of firmware version""" - if request.config.getoption("--1.x"): - fw_version_list = [] - try: - - for fw_obj in instantiate_firmware: - latest_firmware = fw_obj.get_fw_version() - latest_firmware = latest_firmware.replace(".tar.gz", "") - fw_version_list.append(latest_firmware) - except Exception as e: - print(e) - fw_version_list = [] - - yield fw_version_list - else: - # 2.x - pass - - -@pytest.fixture(scope="session") -def upload_firmware(request, should_upload_firmware, instantiate_firmware): - """yields the firmware_id that is uploaded to cloud""" - if request.config.getoption("--1.x"): - firmware_id_list = [] - for i in range(0, len(instantiate_firmware)): - firmware_id = instantiate_firmware[i].upload_fw_on_cloud(force_upload=should_upload_firmware) - firmware_id_list.append(firmware_id) - yield firmware_id_list - else: - # 2.x release - yield True - - -@pytest.fixture(scope="session") -def upgrade_firmware(request, instantiate_firmware, get_equipment_ref, check_ap_firmware_cloud, get_latest_firmware, - should_upgrade_firmware, should_upload_firmware, get_apnos, get_configuration): - """yields the status of upgrade of firmware. waits for 300 sec after each upgrade request""" - print(should_upgrade_firmware, should_upload_firmware) - if request.config.getoption("--1.x"): - status_list = [] - active_fw_list = [] - try: - for access_point in get_configuration['access_point']: - ap_ssh = get_apnos(access_point, sdk="1.x") - active_fw = ap_ssh.get_active_firmware() - active_fw_list.append(active_fw) - except Exception as e: - print(e) - active_fw_list = [] - print(active_fw_list, get_latest_firmware) - if get_latest_firmware != active_fw_list: - if request.config.getoption("--skip-upgrade"): - status = "skip-upgrade" - status_list.append(status) - else: - - for i in range(0, len(instantiate_firmware)): - status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_ref[i], force_upload=True, - force_upgrade=should_upgrade_firmware) - status_list.append(status) - else: - if should_upgrade_firmware: - for i in range(0, len(instantiate_firmware)): - status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_ref[i], - force_upload=should_upload_firmware, - force_upgrade=should_upgrade_firmware) - status_list.append(status) - else: - status = "skip-upgrade Version Already Available" - status_list.append(status) - yield status_list - else: - # 2.x release - pass - - -@pytest.fixture(scope="session") -def check_ap_firmware_cloud(request, setup_controller, get_equipment_ref): - """yields the active version of firmware on cloud""" - if request.config.getoption("--1.x"): - ap_fw_list = [] - for i in get_equipment_ref: - ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i)) - yield ap_fw_list - else: - # 2.x - pass - - -@pytest.fixture(scope="session") -def check_ap_firmware_ssh(get_configuration, request): - """yields the active version of firmware on ap""" - if request.config.getoption("--1.x"): - active_fw_list = [] - try: - for access_point in get_configuration['access_point']: - ap_ssh = APNOS(access_point) - active_fw = ap_ssh.get_active_firmware() - active_fw_list.append(active_fw) - except Exception as e: - print(e) - active_fw_list = [] - yield active_fw_list - else: - # 2.x - pass - - -@pytest.fixture(scope="session") -def setup_test_run(setup_controller, request, upgrade_firmware, get_configuration, - get_equipment_ref, get_latest_firmware, - get_apnos): - """used to upgrade the firmware on AP and should be called on each test case on a module level""" - if request.config.getoption("--1.x"): - active_fw_list = [] - try: - for access_point in get_configuration['access_point']: - ap_ssh = get_apnos(access_point, sdk="1.x") - active_fw = ap_ssh.get_active_firmware() - active_fw_list.append(active_fw) - except Exception as e: - print(e) - active_fw_list = [] - print(active_fw_list, get_latest_firmware) - if active_fw_list == get_latest_firmware: - yield True - else: - pytest.exit("AP is not Upgraded tp Target Firmware versions") - else: - # 2.x - pass - - -""" -Instantiate Reporting -""" - - -@pytest.fixture(scope="session") -def update_report(request, testbed, get_configuration): - """used to update the test report on testrail/allure""" - if request.config.getoption("--use-testrail"): - tr_client = Reporting() - else: - tr_client = APIClient(request.config.getini("tr_url"), request.config.getini("tr_user"), - request.config.getini("tr_pass"), request.config.getini("tr_project_id")) - if request.config.getoption("--use-testrail"): - tr_client.rid = "skip testrails" - else: - projId = tr_client.get_project_id(project_name=request.config.getini("tr_project_id")) - test_run_name = request.config.getini("tr_prefix") + testbed + "_" + str( - datetime.date.today()) + "_" + get_configuration['access_point'][0]['version'] - tr_client.create_testrun(name=test_run_name, case_ids=list(TEST_CASES.values()), project_id=projId, - milestone_id=request.config.getini("milestone"), - description="Automated Nightly Sanity test run for new firmware build") - rid = tr_client.get_run_id(test_run_name=test_run_name) - tr_client.rid = rid - yield tr_client - - -""" -FRAMEWORK MARKER LOGIC -""" +def client_type(request): + """yields the testbed option selection""" + client_type = request.config.getoption("--client-type") + yield client_type @pytest.fixture(scope="session") @@ -642,135 +206,199 @@ def get_security_flags(): security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", "wpa_wpa2_enterprise_mixed", "wpa2_eap", "wpa2_only_eap", "wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed", - "wpa3_enterprise", "twog", "fiveg", "radius"] + "wpa3_enterprise", "twog", "fiveg", "sixg", "fiveg_lower", "fiveg_upper", "radius"] yield security @pytest.fixture(scope="session") def get_markers(request, get_security_flags): - """used to get the markers on the selected test case class, used in setup_profiles""" + """used to get the markers on the selected test case class, used in setup_configuration""" session = request.node markers = list() security = get_security_flags - security_dict = dict().fromkeys(security) + data = dict() for item in session.items: + data[item] = [] for j in item.iter_markers(): + for i in security: + if j.name == i: + if j.name == "twog": + data[item].append("2G") + continue + if j.name == "fiveg": + data[item].append("5G") + continue + if j.name == "sixg": + data[item].append("6G") + continue + if j.name == "fiveg_lower": + data[item].append("5G-lower") + continue + if j.name == "fiveg_upper": + data[item].append("5G-upper") + continue + data[item].append(j.name) + print(j.name) markers.append(j.name) - for i in security: - if set(markers).__contains__(i): - security_dict[i] = True - else: - security_dict[i] = False - - yield security_dict + print(data) + yield data @pytest.fixture(scope="session") -def test_access_point(fixtures_ver, request, get_configuration, get_apnos): - """used to check the manager status of AP, should be used as a setup to verify if ap can reach cloud""" - status = fixtures_ver.get_ap_cloud_connectivity_status(get_configuration, get_apnos) - - def teardown_session(): - data = [] - data.append(False) - for s in status: - data.append(s[0]) - print(data) - if False not in data: - pytest.exit("AP is Not connected to ucentral gw") - allure.attach(name=str(status), body="") - - request.addfinalizer(teardown_session) - yield status - - -@pytest.fixture(scope="session") -def test_ap_connection_status(fixtures_ver, request, get_configuration, get_apnos): - """used to check the manager status of AP, should be used as a setup to verify if ap can reach cloud""" - connection, redirector_value = fixtures_ver.get_ap_status_logs(get_configuration, get_apnos) - yield connection, redirector_value - - -@pytest.fixture(scope="session") -def traffic_generator_connectivity(testbed, get_configuration): - """Verify if traffic generator is reachable""" - if get_configuration['traffic_generator']['name'] == "lanforge": - lanforge_ip = get_configuration['traffic_generator']['details']['ip'] - lanforge_port = get_configuration['traffic_generator']['details']['port'] - # Condition : - # if gui connection is not available - # yield False - # Condition : - # If Gui Connection is available - # yield the gui version +def get_target_object(request, run_lf, get_testbed_details, add_allure_environment_property: Callable) -> None: + """yields the testbed option selection""" + if request.config.getoption("--skip-all"): + pytest.skip("Skipping all") + t_object = None + if not run_lf: try: - cv = cv_test(lanforge_ip, lanforge_port) - url_data = cv.get_ports("/") - lanforge_GUI_version = url_data["VersionInfo"]["BuildVersion"] - lanforge_gui_git_version = url_data["VersionInfo"]["GitVersion"] - lanforge_gui_build_date = url_data["VersionInfo"]["BuildDate"] - print(lanforge_GUI_version, lanforge_gui_build_date, lanforge_gui_git_version) - if not (lanforge_GUI_version or lanforge_gui_build_date or lanforge_gui_git_version): - yield False - else: - yield lanforge_GUI_version - except: - yield False + t_object = target(controller_data=get_testbed_details["controller"], target=get_testbed_details["target"], + configuration=configuration, + device_under_tests_info=get_testbed_details["device_under_tests"]) + if not request.config.getoption("--skip-env"): + if get_testbed_details["target"] == "tip_2x": + t_object.setup_environment_properties(add_allure_environment_property= + add_allure_environment_property) + + except Exception as e: + t_object = None + logging.error( + "Exception is setting up Target Library Object: " + str( + e) + " Check the lab_info.json for the Data and ") + pytest.exit("Exception is setting up Target Library Object: " + str(e)) + + def teardown_target(): + if t_object is not None: + t_object.teardown_objects() + + request.addfinalizer(teardown_target) + yield t_object + + +@pytest.fixture(scope="session") +def get_testbed_details(selected_testbed, request): + """yields the selected testbed information from lab info file (configuration.py)""" + try: + TESTBED = CONFIGURATION[selected_testbed] + except Exception as e: + logging.error("Error in Fetching Testbed: " + str(e)) + pytest.exit("Exception in getting Testbed Details. Testbed Details are not available : " + selected_testbed) + if request.config.getini("controller_url") != "0": + TESTBED["controller"]["url"] = request.config.getini("controller_url") + if request.config.getini("firmware") != "0": + version = request.config.getini("firmware") + version_list = version.split(",") + for i in range(len(TESTBED["device_under_tests"])): + TESTBED["device_under_tests"][i]["version"] = version_list[0] + allure.attach(name="Testbed Details", body=str(json.dumps(TESTBED, indent=2)), + attachment_type=allure.attachment_type.JSON) + yield TESTBED + + +@pytest.fixture(scope="session") +def get_controller_version(fixtures_ver, run_lf, cc_1): + version = "" + if not run_lf and not cc_1: + version = fixtures_ver.get_sdk_version() + print(version) + yield version + + +@pytest.fixture(scope="session") +def get_dut_versions(fixtures_ver, run_lf, cc_1): + version = "" + if not run_lf and not cc_1: + version = fixtures_ver.get_sdk_version() + print(version) + yield version + + +@pytest.fixture(scope="session") +def is_test_library_perfecto_android(request): + interop = request.config.getoption("--use-perfecto-android") + yield interop + + +@pytest.fixture(scope="session") +def is_test_library_perfecto_ios(request): + interop = request.config.getoption("--use-perfecto-ios") + yield interop + + +@pytest.fixture(scope="session") +def get_test_library(get_testbed_details, is_test_library_perfecto_android, is_test_library_perfecto_ios, request, + get_device_configuration, device, run_lf): + if request.config.getoption("--skip-all"): + pytest.skip("Skipping all") + if is_test_library_perfecto_android: + obj = android_tests.AndroidTests(perfecto_data=PERFECTO_DETAILS, + dut_data=get_testbed_details["device_under_tests"], device=device) + + elif is_test_library_perfecto_ios: + obj = ios_tests.ios_tests(perfecto_data=PERFECTO_DETAILS, dut_data=get_testbed_details["device_under_tests"], + device=device) else: - yield True + obj = lf_tests(lf_data=get_testbed_details["traffic_generator"], + dut_data=get_testbed_details["device_under_tests"], + log_level=logging.DEBUG, + run_lf=run_lf, + influx_params=None) + pwd = os.getcwd() + isExist = os.path.exists(str(pwd) + "/../reports") + if not isExist: + os.mkdir(str(pwd) + "/../reports") + def teardown_test(): + if is_test_library_perfecto_android: + try: + obj.teardown() + except Exception as e: + print(e) + logging.error("Exception in teardown") + elif is_test_library_perfecto_ios: + try: + obj.teardown() + except Exception as e: + print(e) + logging.error("Exception in teardown") + else: + pass -@pytest.fixture(scope="session") -def create_lanforge_chamberview_dut(lf_tools, skip_lf, run_lf): - dut_name = "" - if (not run_lf) and (not skip_lf): - dut_object, dut_name = lf_tools.Create_Dut() - return dut_name - - -@pytest.fixture(scope="session") -def lf_tools(get_configuration, testbed, skip_lf, run_lf, get_ap_version, cc_1): - """ Create a DUT on LANforge""" - if not skip_lf: - obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"], - testbed=testbed, run_lf=run_lf, access_point_data=get_configuration["access_point"], - cc_1=cc_1, ap_version=get_ap_version) - else: - obj = False + request.addfinalizer(teardown_test) yield obj @pytest.fixture(scope="session") -def lf_reports(): - obj = Report() - yield obj +def execution_number(request): + number = int(request.param) + print(number) + mode = "NAT-WAN" + if number == 0: + mode = "NAT-WAN" + if number == 1: + mode = "NAT-LAN" + yield mode @pytest.fixture(scope="session") -def lf_test(get_configuration, setup_influx, request, skip_lf, run_lf, skip_pcap): - if not skip_lf: - if request.config.getoption("--exit-on-fail"): - obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx, - debug=True, run_lf=run_lf, skip_pcap=skip_pcap) - if request.config.getoption("--exit-on-fail") is False: - obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx, - debug=False, run_lf=run_lf, skip_pcap=skip_pcap) - yield obj +def radius_info(): + """yields the radius server information from lab info file""" + yield configuration.RADIUS_SERVER_DATA @pytest.fixture(scope="session") -def setup_influx(testbed, get_configuration): - """ Setup Influx Parameters: Used in CV Automation""" - influx_params["influx_tag"] = [testbed, get_configuration["access_point"][0]["model"]] - yield influx_params +def rate_radius_info(): + """yields the radius server information from lab info file""" + yield configuration.RATE_LIMITING_RADIUS_SERVER_DATA -# Need for Perforce Mobile Device Execution -def pytest_sessionstart(session): - session.results = dict() +@pytest.fixture(scope="session") +def rate_radius_accounting_info(): + """yields the radius accounting information from lab info file""" + yield configuration.RATE_LIMITING_RADIUS_ACCOUNTING_DATA -@fixture(scope='session', autouse=True) +@pytest.fixture(scope='session', autouse=True) def add_allure_environment_property(request: SubRequest) -> Optional[Callable]: environment_properties = dict() @@ -784,236 +412,73 @@ def add_allure_environment_property(request: SubRequest) -> Optional[Callable]: if not alluredir or not os.path.isdir(alluredir) or not environment_properties: return - allure_env_path = path.join(alluredir, ALLURE_ENVIRONMENT_PROPERTIES_FILE) + allure_env_path = os.path.join(alluredir, ALLURE_ENVIRONMENT_PROPERTIES_FILE) with open(allure_env_path, 'w') as _f: data = '\n'.join([f'{variable}={value}' for variable, value in environment_properties.items()]) _f.write(data) -@fixture(scope='session') -def add_env_properties(request, get_configuration, get_sdk_version, get_apnos, fixtures_ver, cc_1, - add_allure_environment_property: Callable) -> None: - if request.config.getoption("--skip-env"): - add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) - return - if cc_1: - for i in range(len(get_configuration["access_point"])): - add_allure_environment_property(str('Access-Point-Model' + str(i + 1)), - get_configuration["access_point"][i]["model"]) - else: - add_allure_environment_property('Access-Point-Model', get_configuration["access_point"][0]["model"]) - add_allure_environment_property('SDK-Version', get_sdk_version) - try: - if not cc_1: - add_allure_environment_property('Access-Point-Firmware-Version', - fixtures_ver.get_ap_version(get_apnos, get_configuration)[0].split("\n")[1]) - except Exception as e: - print(e) - pass - if cc_1: - listkey = list(get_configuration["controller"].keys()) - if "version" in listkey: - add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) - add_allure_environment_property('Controller-Version', get_configuration["controller"]["version"]) - for i in range(len(get_configuration["access_point"])): - add_allure_environment_property(str('AP-Name-' + str(i + 1)), - get_configuration["access_point"][i]["ap_name"]) - for i in range(len(get_configuration["access_point"])): - add_allure_environment_property(str('AP-Serial-Number-' + str(i + 1)), - get_configuration["access_point"][i]["serial"]) - add_allure_environment_property('LANforge-Chipset-Info', - get_configuration["traffic_generator"]["details"]["Chip-set-info"]) - else: - pass - else: - add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) - add_allure_environment_property('AP-Serial-Number', get_configuration["access_point"][0]["serial"] + "\n") - - -@fixture(scope="session") -def add_firmware_property_after_upgrade(add_allure_environment_property, fixtures_ver, get_apnos, - get_configuration): - # try: - add_allure_environment_property('Access-Point-Firmware-Version', - fixtures_ver.get_ap_version(get_apnos, get_configuration)[0].split("\n")[1]) - # except Exception as e: - # print(e) - # pass - - -@pytest.fixture(scope="session") -def fixtures_ver(request, get_configuration, run_lf, cc_1): - if request.config.getoption("1.x") is False and request.config.getoption("cc.1") is False: - print("2.x") - obj = Fixtures_2x(configuration=get_configuration, run_lf=run_lf) - if request.config.getoption("1.x"): - print("1.x") - obj = Fixtures_1x(configuration=get_configuration) - if request.config.getoption("cc.1"): - print(" fixture version cc.1") - obj = Fixtures_3x(configuration=get_configuration, run_lf=run_lf, cc_1=cc_1) - yield obj - - -@pytest.fixture(scope="session") -def firmware_upgrade(fixtures_ver, get_apnos, get_configuration): - upgrade_status = fixtures_ver.setup_firmware(get_apnos, get_configuration) - yield upgrade_status - - -""" -Logs related Fixtures -""" - - @pytest.fixture(scope="function") -def get_ap_logs(request, get_apnos, get_configuration, run_lf): +def get_dut_logs_per_test_case(request, run_lf, get_testbed_details, get_target_object): if not run_lf: 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) - - # Adding memory Profile code before every test start - output = ap_ssh.get_memory_profile() - allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + for i in range(len(get_testbed_details["device_under_tests"])): + get_target_object.get_dut_library_object().run_generic_command( + cmd="logger start testcase: " + instance_name, + idx=i) 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)) - - # Adding memory Profile code after every test completion - output = ap_ssh.get_memory_profile() - allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + for i in range(len(get_testbed_details["device_under_tests"])): + get_target_object.get_dut_library_object().run_generic_command( + cmd="logger stop testcase: " + instance_name, + idx=i) + ap_logs = get_target_object.get_dut_library_object().get_logread( + start_ref="start testcase: " + instance_name, + stop_ref="stop testcase: " + instance_name) + allure.attach(name='Logs - ' + get_testbed_details["device_under_tests"][i]["identifier"], + body=str(ap_logs)) request.addfinalizer(collect_logs) @pytest.fixture(scope="function") -def get_lf_logs(request, get_apnos, get_configuration): - ip = get_configuration["traffic_generator"]["details"]["ip"] - port = get_configuration["traffic_generator"]["details"]["ssh_port"] +def get_test_device_logs(request, get_testbed_details, get_target_object, skip_lf): + if not skip_lf: + ip = get_testbed_details["traffic_generator"]["details"]["manager_ip"] + port = get_testbed_details["traffic_generator"]["details"]["ssh_port"] - def collect_logs_lf(): - log_0 = "/home/lanforge/lanforge_log_0.txt" - log_1 = "/home/lanforge/lanforge_log_1.txt" - obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_0, - local_path=".") - obj.pull_file() - allure.attach.file(source="lanforge_log_0.txt", - name="lanforge_log_0") - obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_1, - local_path=".") - obj.pull_file() - allure.attach.file(source="lanforge_log_1.txt", - name="lanforge_log_1") + def collect_logs_tg(): + log_0 = "/home/lanforge/lanforge_log_0.txt" + log_1 = "/home/lanforge/lanforge_log_1.txt" + obj = scp_file(ip=ip, port=port, username="root", password="lanforge", remote_path=log_0, + local_path=".") + obj.pull_file() + allure.attach.file(source="lanforge_log_0.txt", + name="lanforge_log_0") + obj = scp_file(ip=ip, port=port, username="root", password="lanforge", remote_path=log_1, + local_path=".") + obj.pull_file() + allure.attach.file(source="lanforge_log_1.txt", + name="lanforge_log_1") - request.addfinalizer(collect_logs_lf) + request.addfinalizer(collect_logs_tg) @pytest.fixture(scope="function") -def get_apnos_logs(get_apnos, get_configuration): - all_logs = [] - for ap in get_configuration['access_point']: - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - logs = ap_ssh.logread() - all_logs.append(logs) - yield all_logs +def check_connectivity(request, get_testbed_details, get_target_object, run_lf): + def collect_logs(): + for i in range(len(get_testbed_details["device_under_tests"])): + ret_val = get_target_object.get_dut_library_object().ubus_call_ucentral_status(idx=i, attach_allure=True, + retry=10) + if not ret_val["connected"] or ret_val["connected"] is None: + ap_logs = get_target_object.get_dut_library_object().get_dut_logs() + allure.attach(name='Logs - ' + get_testbed_details["device_under_tests"][i]["identifier"], + body=str(ap_logs)) + allure.attach(name='Device : ' + get_testbed_details["device_under_tests"][i]["identifier"] + + " is connected after Test", body="") -@pytest.fixture(scope="function") -def get_controller_logs(get_configuration, ): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - summary = obj.show_ap_summary() - print(summary) - allure.attach(name='show ap summary', body=str(summary)) - - -@pytest.fixture(scope="function") -def get_ap_config_slots(get_configuration): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - slot = obj.show_ap_config_slots() - # print(slot) - allure.attach(name="ap_slots", body=str(slot)) - - -@pytest.fixture(scope="session") -def get_apnos_max_clients(get_apnos, get_configuration): - all_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="chmod +x /usr/share/ucentral/wifi_max_user.uc") - a = ap_ssh.run_generic_command(cmd="/usr/share/ucentral/wifi_max_user.uc") - try: - all_logs.append(a[1]) - except Exception as e: - pass - yield all_logs - - -@pytest.fixture(scope="function") -def get_ap_channel(get_apnos, get_configuration): - all_data = [] - dict_band_channel = {} - for ap in get_configuration['access_point']: - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - a = ap_ssh.run_generic_command(cmd="iw dev | grep channel") - print("ap command output:- ", a) - try: - a = a[1:] - for i in a: - if i == '': - continue - j = int(re.findall('\d+', i)[0]) - print(j) - if j >= 36: - dict_band_channel["5G"] = j - continue - elif j < 36: - dict_band_channel["2G"] = j - continue - if not "2G" in dict_band_channel: - dict_band_channel["2G"] = "AUTO" - if not "5G" in dict_band_channel: - dict_band_channel["5G"] = "AUTO" - all_data.append(dict_band_channel) - except Exception as e: - print(e) - pass - print(all_data) - yield all_data - - -@pytest.fixture(scope="function") -def disable_band5ghz(get_configuration): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - shut = obj.ap_5ghz_shutdown() - print(shut) - - -@pytest.fixture(scope="function") -def disable_band2ghz(get_configuration): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - shut = obj.ap_2ghz_shutdown() - print(shut) - - -@pytest.fixture(scope="function") -def disable_band6ghz(get_configuration): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - shut = obj.ap_6ghz_shutdown() - print(shut) - - -@pytest.fixture(scope="function") -def enable_all_bands(get_configuration): - obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) - obj.no_ap_5ghz_shutdown() - obj.no_ap_2ghz_shutdown() - obj.no_ap_6ghz_shutdown() + if not run_lf: + request.addfinalizer(collect_logs) diff --git a/tests/controller_tests/test_api_login.py b/tests/controller_tests/test_api_login.py deleted file mode 100644 index a5d370923..000000000 --- a/tests/controller_tests/test_api_login.py +++ /dev/null @@ -1,22 +0,0 @@ -""" - Test Case Module: Testing Basic Cloud - -""" -import pytest -from configuration import CONFIGURATION - - -@pytest.mark.sanity -@pytest.mark.sanity_55 -@pytest.mark.sdk_version_check -def test_cloud_sdk_version(setup_controller, testbed, test_cases, update_report): - try: - response = setup_controller.portal_ping() - if CONFIGURATION[testbed]['controller']['version'] == response._project_version: - PASS = True - else: - PASS = False - except Exception as e: - print(e) - PASS = False - assert PASS diff --git a/tests/controller_tests/ucentral_gateway/test_fms_service.py b/tests/controller_tests/ucentral_gateway/test_fms_service.py index c5265f21a..0880d4797 100644 --- a/tests/controller_tests/ucentral_gateway/test_fms_service.py +++ b/tests/controller_tests/ucentral_gateway/test_fms_service.py @@ -15,9 +15,10 @@ import pytest class TestUcentralFMSService(object): @pytest.mark.system_info_fms + @pytest.mark.jk @allure.title("Get System Info FMS") - def test_system_info_fms(self, setup_controller): - system_info = setup_controller.get_system_fms() + def test_system_info_fms(self, get_target_object): + system_info = get_target_object.controller_library_object.get_system_fms() print(system_info.json()) allure.attach(name="system info", body=str(system_info.json()), attachment_type=allure.attachment_type.JSON) assert system_info.status_code == 200 \ No newline at end of file diff --git a/tests/controller_tests/ucentral_gateway/test_gatewayservice.py b/tests/controller_tests/ucentral_gateway/test_gatewayservice.py index 97e6f3a52..1a608498b 100644 --- a/tests/controller_tests/ucentral_gateway/test_gatewayservice.py +++ b/tests/controller_tests/ucentral_gateway/test_gatewayservice.py @@ -16,8 +16,8 @@ import pytest @pytest.mark.ow_sanity_lf @pytest.mark.ow_sdk_load_tests @pytest.mark.owgw_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Gateway Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Gateway Service Tests") class TestUcentralGatewayService(object): """ """ @@ -120,22 +120,28 @@ class TestUcentralGatewayService(object): } @allure.title("Get All Devices") - def test_gwservice_listdevices(self, setup_controller): + @allure.testcase(name="WIFI-11399", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11399") + @pytest.mark.get_all_devices + def test_gwservice_listdevices(self, get_target_object): """ - Test the list devices endpoint - WIFI-3452 + Test the list of devices endpoint + Unique marker: pytest -m "get_all_devices" """ - resp = setup_controller.get_devices() + resp = get_target_object.controller_library_object.get_devices() # print(resp.json()) # allure.attach(name="Devices", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 - @pytest.mark.gw_cred_dev + @pytest.mark.gw_crud_dev @allure.title("CRUD Device") - def test_gwservice_create_edit_delete_device(self, setup_controller, testbed): + @allure.testcase(name="WIFI-11399", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11399") + @pytest.mark.CRUD + def test_gwservice_create_read_edit_delete_device(self, get_target_object, selected_testbed): """ - Test the create & edit and delete device endpoint - WIFI-3453 + Test to create,read,edit and delete device endpoint + Unique marker: pytest -m "CRUD" """ device_mac = "02:00:00:%02x:%02x:%02x" % (random.randint(0, 255), random.randint(0, 255), @@ -151,7 +157,7 @@ class TestUcentralGatewayService(object): 'manufacturer': 'Testing through Automation', 'owner': ''} # print(json.dumps(payload)) - resp = setup_controller.add_device_to_gw(device_name, payload) + resp = get_target_object.controller_library_object.add_device_to_gw(device_name, payload) # allure.attach(name="response: ", body=str(resp.json())) body = resp.url + "," + str(resp.status_code) + ',' + resp.text # allure.attach(name="Gateway create device", body=body) @@ -160,7 +166,7 @@ class TestUcentralGatewayService(object): devices = json.loads(resp.text) # print(devices) - resp = setup_controller.get_device_by_serial_number(device_name) + resp = get_target_object.controller_library_object.get_device_by_serial_number(device_name) body = resp.url + "," + str(resp.status_code) + ',' + resp.text # allure.attach(name="Gateway create device-verify", body=body) if resp.status_code != 200: @@ -175,7 +181,7 @@ class TestUcentralGatewayService(object): ] } # print(json.dumps(editing_payload)) - resp = setup_controller.edit_device_on_gw(device_name, editing_payload) + resp = get_target_object.controller_library_object.edit_device_on_gw(device_name, editing_payload) # allure.attach(name="response: ", body=str(resp.json())) body = resp.url + "," + str(resp.status_code) + ',' + resp.text # allure.attach(name="Gateway edited device", body=body) @@ -184,13 +190,13 @@ class TestUcentralGatewayService(object): devices = json.loads(resp.text) # print(devices) - resp = setup_controller.get_device_by_serial_number(device_name) + resp = get_target_object.controller_library_object.get_device_by_serial_number(device_name) body = resp.url + "," + str(resp.status_code) + ',' + resp.text # allure.attach(name="Gateway edited device-verify", body=body) if resp.status_code != 200: assert False - resp = setup_controller.delete_device_from_gw(device_name) + resp = get_target_object.controller_library_object.delete_device_from_gw(device_name) body = resp.url + "," + str(resp.status_code) + ',' + resp.text # allure.attach(name="gw created device-delete", body=body) if resp.status_code != 200: @@ -198,105 +204,140 @@ class TestUcentralGatewayService(object): @pytest.mark.system_info_gw @allure.title("System Info OW Gateway Service") - def test_system_info_gw(self, setup_controller): - system_info = setup_controller.get_system_gw() + @allure.testcase(name="WIFI-11436", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11436") + @pytest.mark.OW_gateway_service + def test_system_info_gw(self, get_target_object): + """ + Test to verify OW gateway services + Unique marker: pytest -m "OW_gateway_service" + """ + system_info = get_target_object.controller_library_object.get_system_gw() # print(system_info.json()) # allure.attach(name="system info", body=str(system_info.json()), #attachment_type=#allure.#attachment_type.JSON) assert system_info.status_code == 200 @pytest.mark.gw_commands @allure.title("Get OW Gateway Commands") - def test_gw_commands(self, setup_controller, get_configuration): - device_name = get_configuration['access_point'][0]['serial'] - system_info = setup_controller.get_commands(device_name) - # print(system_info.json()) + @allure.testcase(name="WIFI-11437", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11437") + def test_gw_commands(self, get_target_object, get_testbed_details): + """ + Test to verify OW gateway commands executed + Unique marker: pytest -m "gw_commands" + """ + + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_commands(device_name) + # print(resp.json()) # allure.attach(name="Gateway list of commands", body=str(system_info.json()), - ##attachment_type=#allure.#attachment_type.JSON) - assert system_info.status_code == 200 + assert resp.status_code == 200 @pytest.mark.gw_device_logs @allure.title("Get Device Logs") - def test_gw_service_get_logs(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11438", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11438") + def test_gw_service_get_logs(self, get_target_object, get_testbed_details): """ Test the device logs present in Gateway UI + Unique marker:pytest -m "gw_device_logs" """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_device_logs(device_name) + print("XXXXXXX", get_testbed_details) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_device_logs(device_name) # print(resp.json()) # allure.attach(name="Device Logs", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_device_health_checks @allure.title("Get Health Checks") - def test_gw_service_get_health_checks(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11439", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11439") + def test_gw_service_get_health_checks(self, get_target_object, get_testbed_details): """ Test the device health checks present in Gateway UI + Unique marker:pytest -m "gw_device_health_checks" """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_device_health_checks(device_name) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_device_health_checks(device_name) # print(resp.json()) # allure.attach(name="Device Health checks", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_device_capabilities @allure.title("Get Capabilities") - def test_gw_service_get_capabilities(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11441", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11441") + def test_gw_service_get_capabilities(self, get_target_object, get_testbed_details): """ Test the device capabilities present in Gateway UI + Unique marker:pytest -m "gw_device_capabilities" """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_device_capabilities(device_name) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_device_capabilities(device_name) # print(resp.json()) # allure.attach(name="Device capabilities", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_device_statistics @allure.title("Get Statistics") - def test_gw_service_get_statistics(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11442", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11442") + def test_gw_service_get_statistics(self, get_target_object, get_testbed_details): """ Test the device statistics present in Gateway UI + Unique marker: pytest -m "gw_device_statistics" """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_device_statistics(device_name) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_device_statistics(device_name) # print(resp.json()) # allure.attach(name="Device statistics", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_device_status @allure.title("Get Device Status") - def test_gw_service_get_status(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11443", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11443") + def test_gw_service_get_status(self, get_target_object, get_testbed_details): """ Test the device status present in Gateway UI + Unique marker: pytest -m "gw_device_status" """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_device_status(device_name) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_device_status(device_name) # print(resp.json()) # allure.attach(name="Device status", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_ping_device @allure.title("Ping Device") - def test_gw_service_ping_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11444", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11444") + def test_gw_service_ping_device(self, get_target_object, get_testbed_details): """ Test to Ping device present in Gateway UI + Unique marker:pytest -m "gw_ping_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name } # print(json.dumps(payload)) - resp = setup_controller.ping_device(device_name, payload) + resp = get_target_object.controller_library_object.ping_device(device_name, payload) # print(resp.json()) # allure.attach(name="Device Ping status", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_led_blink_device @allure.title("Blink LED API") - def test_gw_service_led_blink_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11445", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11445") + def test_gw_service_led_blink_device(self, get_target_object, get_testbed_details): """ Test to Blink led on device present in Gateway UI + Unique marker: pytest -m "gw_led_blink_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "when": 0, @@ -304,7 +345,7 @@ class TestUcentralGatewayService(object): "pattern": "on" } # print(json.dumps(payload)) - resp = setup_controller.led_blink_device(device_name, payload) + resp = get_target_object.controller_library_object.led_blink_device(device_name, payload) # print(resp.json()) # allure.attach(name="Device Blink led status", body=str(resp.json()), # attachment_type=#allure.#attachment_type.JSON) @@ -312,11 +353,14 @@ class TestUcentralGatewayService(object): @pytest.mark.gw_trace_device @allure.title("Trace Command") - def test_gw_service_trace_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11446", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11446") + def test_gw_service_trace_device(self, get_target_object, get_testbed_details): """ Test to trace device present in Gateway UI + Unique marker:pytest -m "gw_trace_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "when": 0, @@ -326,18 +370,21 @@ class TestUcentralGatewayService(object): "interface": "string" } # print(json.dumps(payload)) - resp = setup_controller.trace_device(device_name, payload) + resp = get_target_object.controller_library_object.trace_device(device_name, payload) # print(resp.json()) # allure.attach(name="Device trace status", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 @pytest.mark.gw_wifi_scan_device @allure.title("Wi-Fi Scan Device") - def test_gw_service_wifi_scan_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11447", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11447") + def test_gw_service_wifi_scan_device(self, get_target_object, get_testbed_details): """ - Test to Wifi scan device present in Gateway UI + Test to Wi-Fi scan device present in Gateway UI + Unique marker:pytest -m "gw_wifi_scan_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "verbose": True, @@ -349,7 +396,7 @@ class TestUcentralGatewayService(object): } } # print(json.dumps(payload)) - resp = setup_controller.wifi_scan_device(device_name, payload) + resp = get_target_object.controller_library_object.wifi_scan_device(device_name, payload) # print(resp.json()) # allure.attach(name="Device Wifi scan status", body=str(resp.json()), # attachment_type=#allure.#attachment_type.JSON) @@ -357,18 +404,21 @@ class TestUcentralGatewayService(object): @pytest.mark.gw_request_msg_device @allure.title("Request Message Device") - def test_gw_service_request_msg_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11448", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11448") + def test_gw_service_request_msg_device(self, get_target_object, get_testbed_details): """ Test to Request specific msg from device present in Gateway UI + Unique marker:pytest -m "gw_request_msg_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "when": 0, "message": "state" } # print(json.dumps(payload)) - resp = setup_controller.request_specific_msg_from_device(device_name, payload) + resp = get_target_object.controller_library_object.request_specific_msg_from_device(device_name, payload) # print(resp.json()) # allure.attach(name="Device Request specific msg status", body=str(resp.json()), # attachment_type=#allure.#attachment_type.JSON) @@ -376,11 +426,14 @@ class TestUcentralGatewayService(object): @pytest.mark.gw_event_queue_device @allure.title("Get Event Queue of Device") - def test_gw_service_event_queue_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11452", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11452") + def test_gw_service_event_queue_device(self, get_target_object, get_testbed_details): """ Test to Request Event Queue from device present in Gateway UI + Unique marker:pytest -m "gw_event_queue_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "types": [ @@ -388,7 +441,7 @@ class TestUcentralGatewayService(object): ] } # print(json.dumps(payload)) - resp = setup_controller.event_queue(device_name, payload) + resp = get_target_object.controller_library_object.event_queue(device_name, payload) # print(resp.json()) # allure.attach(name="Device Request Event Queue status", body=str(resp.json()), # attachment_type=#allure.#attachment_type.JSON) @@ -396,11 +449,14 @@ class TestUcentralGatewayService(object): @pytest.mark.gw_telemetry_device @allure.title("Telemetry Device") - def test_gw_service_telemetry_device(self, setup_controller, get_configuration): + @allure.testcase(name="WIFI-11453", + url="https://telecominfraproject.atlassian.net/browse/WIFI-11453") + def test_gw_service_telemetry_device(self, get_target_object, get_testbed_details): """ Test to Request telemetry from device present in Gateway UI + Unique marker:pytest -m "gw_telemetry_device" """ - device_name = get_configuration['access_point'][0]['serial'] + device_name = get_testbed_details['device_under_tests'][0]['identifier'] payload = { "serialNumber": device_name, "interval": 0, @@ -412,7 +468,7 @@ class TestUcentralGatewayService(object): "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } # print(json.dumps(payload)) - resp = setup_controller.telemetry(device_name, payload) + resp = get_target_object.controller_library_object.telemetry(device_name, payload) # print(resp.json()) # allure.attach(name="Device telemetry status", body=str(resp.json()), # attachment_type=#allure.#attachment_type.JSON) @@ -423,12 +479,12 @@ class TestUcentralGatewayService(object): @pytest.mark.ow_sdk_load_tests @pytest.mark.owgw_api_tests @allure.title("RTTY API") -def test_gw_service_get_rtty(self, setup_controller, get_configuration): +def test_gw_service_get_rtty(self, get_target_object, get_testbed_details): """ Test the device rtty parameters in Gateway UI """ - device_name = get_configuration['access_point'][0]['serial'] - resp = setup_controller.get_rtty_params(device_name) + device_name = get_testbed_details['device_under_tests'][0]['identifier'] + resp = get_target_object.controller_library_object.get_rtty_params(device_name) # print(resp.json()) # allure.attach(name="Device RTTY parameters", body=str(resp.json()), #attachment_type=#allure.#attachment_type.JSON) assert resp.status_code == 200 diff --git a/tests/controller_tests/ucentral_gateway/test_provisionservice.py b/tests/controller_tests/ucentral_gateway/test_provisionservice.py index fd38cffbc..9815950ae 100644 --- a/tests/controller_tests/ucentral_gateway/test_provisionservice.py +++ b/tests/controller_tests/ucentral_gateway/test_provisionservice.py @@ -9,6 +9,7 @@ import random import allure import pytest +import logging @pytest.mark.ow_sanity_lf @@ -16,8 +17,8 @@ import pytest @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Inventory API tests") class TestProvAPIInventory(object): global device_name, entity_id, contact_id, location_id, venue_id, map_id, operator_id, service_class_id, \ @@ -27,22 +28,29 @@ class TestProvAPIInventory(object): random.randint(0, 255)) device_name = device_mac.replace(":", "") - @pytest.mark.prov_api + @pytest.mark.prov_api_all_inventory @allure.title("Get All Inventory List") - def test_provservice_inventorylist(self, setup_prov_controller, get_configuration): + @allure.testcase(name="WIFI-7859", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7859") + + def test_provservice_inventorylist(self, get_target_object, get_testbed_details): """ - Test the device present in Provisioning UI + Test to get the information of all device present in Inventory of Provisioning UI + Unique marker:pytest -m "prov_api_all_inventory" """ - resp = setup_prov_controller.get_inventory() + resp = get_target_object.prov_library_object.get_inventory() # print(resp.json()) # allure.attach(name="Inventory", body=str(resp.json()), attachment_type=#allure.attachment_type.JSON) assert resp.status_code == 200 - @pytest.mark.owprov_api_inventory + @pytest.mark.owprov_api_create_inventory @allure.title("Create Inventory device") - def test_prov_service_create_inventory_device(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9237", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9237") + def test_prov_service_create_inventory_device(self, get_target_object, selected_testbed): """ - Test the create device in provision Inventory + Test the create device in Inventory of provision Inventory + Unique marker: pytest -m "owprov_api_create_inventory" """ payload = {"serialNumber": device_name, "name": "Testing_to_add_device_through_automation", @@ -62,20 +70,33 @@ class TestProvAPIInventory(object): "deviceTypes": ["edgecore_eap101"] } } - resp = setup_prov_controller.add_device_to_inventory(device_name, payload) + resp = get_target_object.prov_library_object.add_device_to_inventory(device_name, payload) if resp.status_code != 200: assert False - @pytest.mark.owprov_api_inventory + @pytest.mark.owprov_api_read_inventory @allure.title("Read Inventory device") - def test_prov_service_read_inventory_device(self, setup_prov_controller, testbed): - resp = setup_prov_controller.get_inventory_by_device(device_name) + @allure.testcase(name="WIFI-9236", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9236") + def test_prov_service_read_inventory_device(self, get_target_object, selected_testbed): + """ + Test to Read a device from Inventory of Provision service + Unique marker: pytest -m "owprov_api_read_inventory" + """ + resp = get_target_object.prov_library_object.get_inventory_by_device(device_name) if resp.status_code != 200: assert False - @pytest.mark.owprov_api_inventory + @pytest.mark.owprov_api_edit_inventory @allure.title("Edit Inventory device") - def test_prov_service_edit_inventory_device(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9238", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9238") + + def test_prov_service_edit_inventory_device(self, get_target_object, selected_testbed): + """ + Test to Edit a device in inventory of Provision Service + Unique marker: pytest -m "owprov_api_edit_inventory" + """ # This is for Edititng the information fo device in Inventory editing_payload = { "description": "For testing API through automation after editing", @@ -87,17 +108,23 @@ class TestProvAPIInventory(object): "rrm": "inherit", "venue": "" } - resp = setup_prov_controller.edit_device_from_inventory(device_name, editing_payload) + resp = get_target_object.prov_library_object.edit_device_from_inventory(device_name, editing_payload) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_inventory_by_device(device_name) + resp = get_target_object.prov_library_object.get_inventory_by_device(device_name) if resp.status_code != 200: assert False - @pytest.mark.owprov_api_inventory + @pytest.mark.owprov_api_delete_inventory @allure.title("Delete Inventory device") - def test_prov_service_delete_inventory_device(self, setup_prov_controller, testbed): - resp = setup_prov_controller.delete_device_from_inventory(device_name) + @allure.testcase(name="WIFI-9239", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9239") + def test_prov_service_delete_inventory_device(self, get_target_object, selected_testbed): + """ + Test to Delete a device in Inventory of Provision service + Unique marker:owprov_api_delete_inventory + """ + resp = get_target_object.prov_library_object.delete_device_from_inventory(device_name) if resp.status_code != 200: assert False @@ -106,15 +133,15 @@ class TestProvAPIInventory(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service System commands API tests") class TestProvAPISystemCommands(object): @pytest.mark.system_info_prov @allure.title("System Info OW Prov Service") - def test_system_info_prov(self, setup_prov_controller): - system_info = setup_prov_controller.get_system_prov() + def test_system_info_prov(self, get_target_object): + system_info = get_target_object.prov_library_object.get_system_prov() #print(system_info.json()) #allure.attach(name="system info", body=str(system_info.json()), attachment_type=#allure.attachment_type.JSON) assert system_info.status_code == 200 @@ -124,21 +151,32 @@ class TestProvAPISystemCommands(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Entity API tests") class TestProvAPIEntity(object): - @pytest.mark.prov_api_entity_test + @pytest.mark.prov_api_readAll_entity_test @allure.title("Read All Entities") - def test_read_all_entities(self, setup_prov_controller): - resp = setup_prov_controller.get_entity() + @allure.testcase(name="WIFI-7704", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7704") + + def test_read_all_entities(self, get_target_object): + """ + Test to Read all entities in Provision service + Unique marker:pytest -m "provi_api_readAll_entity_test" + """ + resp = get_target_object.prov_library_object.get_entity() assert resp.status_code == 200 - @pytest.mark.prov_api_entity_test + @pytest.mark.prov_api_create_entity_test @allure.title("Create Entity") - def test_prov_service_create_entity(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-7836", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7836") + + def test_prov_service_create_entity(self, get_target_object, selected_testbed): """ - Test the create Entity in provision Service + Test to create an Entity in provision Service + Unique marker: pytest -m "prov_api_create_entity_test" """ global entity_id payload = {"name": "Testing_prov", @@ -147,24 +185,37 @@ class TestProvAPIEntity(object): "notes": [{"note": "For testing Purposes through Automation"}], "parent": "0000-0000-0000" } - resp = setup_prov_controller.add_entity(payload) + resp = get_target_object.prov_library_object.add_entity(payload) if resp.status_code != 200: assert False entity = json.loads(resp.text) - print(entity) + logging.info(entity) entity_id = entity['id'] - @pytest.mark.prov_api_entity_test + @pytest.mark.prov_api_read_entity_test @allure.title("Read Entity") - def test_prov_service_read_entity(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-7772", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7772") + def test_prov_service_read_entity(self, get_target_object, selected_testbed): + """ + Test to Read an entity in provision service + Unique marker: pytest -m "prov_api_read_entity_test" + """ global entity_id - resp = setup_prov_controller.get_entity_by_id(entity_id) + resp = get_target_object.prov_library_object.get_entity_by_id(entity_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_entity_test + @pytest.mark.prov_api_edit_entity_test @allure.title("Edit Entity") - def test_prov_service_edit_entity(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-7857", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7857") + + def test_prov_service_edit_entity(self, get_target_object, selected_testbed): + """ + Test to Edit an entity in Provision Service + Unique marker: pytest -m "prov_api_edit_entity_test" + """ # This to edit Entity global entity_id editing_payload = { @@ -176,18 +227,25 @@ class TestProvAPIEntity(object): "sourceIP": [], "uuid": entity_id } - resp = setup_prov_controller.edit_entity(editing_payload, entity_id) + resp = get_target_object.prov_library_object.edit_entity(editing_payload, entity_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_entity_by_id(entity_id) + resp = get_target_object.prov_library_object.get_entity_by_id(entity_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_entity_test + @pytest.mark.prov_api_delete_entity_test @allure.title("Delete Entity") - def test_prov_service_delete_entity(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-7858", + url="https://telecominfraproject.atlassian.net/browse/WIFI-7858") + + def test_prov_service_delete_entity(self, get_target_object, selected_testbed): + """ + Test to Delete an entity in Provision service + Unique marker:pytest -m "prov_api_delete_entity_test" + """ global entity_id - resp = setup_prov_controller.delete_entity(entity_id) + resp = get_target_object.prov_library_object.delete_entity(entity_id) if resp.status_code != 200: assert False @@ -196,22 +254,33 @@ class TestProvAPIEntity(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Contact API tests") class TestProvAPIContact(object): # Contact related Test cases @pytest.mark.prov_api_contact_test @allure.title("Get All Contacts") - def test_get_contacts(self, setup_prov_controller): - resp = setup_prov_controller.get_contact() + @allure.testcase(name="WIFI-9240", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9240") + + def test_get_contacts(self, get_target_object): + """ + Test to get all contacts in Provision services + Unique marker:pytest -m "prov_api_contact_test" + """ + resp = get_target_object.prov_library_object.get_contact() assert resp.status_code == 200 @pytest.mark.prov_api_contact_test @allure.title("Create Contact") - def test_prov_service_create_contact(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9242", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9242") + + def test_prov_service_create_contact(self, get_target_object, selected_testbed): """ - Test the create Contact in provision Service + Test to create Contact in provision Service + Unique marker: pytest -m "prov_api_contact_test" """ global contact_id payload = { @@ -233,24 +302,38 @@ class TestProvAPIContact(object): "entity": "0000-0000-0000", "notes": [{"note": ""}] } - resp = setup_prov_controller.add_contact(payload) + resp = get_target_object.prov_library_object.add_contact(payload) if resp.status_code != 200: assert False contact = json.loads(resp.text) - print(contact) + logging.info(contact) contact_id = contact['id'] - @pytest.mark.prov_api_contact_test + @pytest.mark.prov_read_contact_test @allure.title("Read Contact") - def test_prov_service_read_contact(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9241", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9241") + + def test_prov_service_read_contact(self, get_target_object, selected_testbed): + """ + Test to Read a contact in Provision Services + Unique marker:pytest -m "prov_read_contact_test" + """ global contact_id - resp = setup_prov_controller.get_contact_by_id(contact_id) + resp = get_target_object.prov_library_object.get_contact_by_id(contact_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_contact_test + @pytest.mark.prov_api_edit_contact_test @allure.title("Edit Contact") - def test_prov_service_edit_contact(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9243", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9243") + + def test_prov_service_edit_contact(self, get_target_object, selected_testbed): + """ + Test to edit a contact in Provision service + Unique marker: pytest -m "prov_api_edit_contact_test" + """ # This to edit Contact global contact_id editing_payload = { @@ -270,18 +353,25 @@ class TestProvAPIContact(object): "title": "Testing_contact", "type": "USER" } - resp = setup_prov_controller.edit_contact(editing_payload, contact_id) + resp = get_target_object.prov_library_object.edit_contact(editing_payload, contact_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_contact_by_id(contact_id) + resp = get_target_object.prov_library_object.get_contact_by_id(contact_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_contact_test + @pytest.mark.prov_api_delete_contact_test @allure.title("Delete Contact") - def test_prov_service_delete_contact(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9244", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9244") + + def test_prov_service_delete_contact(self, get_target_object, selected_testbed): + """ + Test to Delete a contact in provision service + Unique marker: pytest -m "prov_api_delete_contact_test" + """ global contact_id - resp = setup_prov_controller.delete_contact(contact_id) + resp = get_target_object.prov_library_object.delete_contact(contact_id) if resp.status_code != 200: assert False @@ -290,22 +380,32 @@ class TestProvAPIContact(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Location API tests") class TestProvAPILocation(object): # Location related Test cases @pytest.mark.prov_api_location @allure.title("Get All Locations") - def test_get_locations(self, setup_prov_controller): - resp = setup_prov_controller.get_location() + @allure.testcase(name="WIFI-9245", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9245") + def test_get_locations(self, get_target_object): + """ + Test to get the information of all locations using Provision services + Unique marker:pytest -m "prov_api_location" + """ + resp = get_target_object.prov_library_object.get_location() assert resp.status_code == 200 - @pytest.mark.prov_api_location_test + @pytest.mark.prov_api_create_location_test @allure.title("Create Location") - def test_prov_service_create_location(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9247", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9247") + + def test_prov_service_create_location(self, get_target_object, selected_testbed): """ - Test the create location in provision Service + Test to create location in provision Service + Unique marker:pytest -m "prov_api_create_location_test" """ global location_id payload = { @@ -325,24 +425,37 @@ class TestProvAPILocation(object): "entity": "0000-0000-0000", "notes": [{"note": "Testing purposes"}] } - resp = setup_prov_controller.add_location(payload) + resp = get_target_object.prov_library_object.add_location(payload) if resp.status_code != 200: assert False location = json.loads(resp.text) - print(location) + logging.info(location) location_id = location['id'] - @pytest.mark.prov_api_location_test + @pytest.mark.prov_api_read_location_test @allure.title("Read Location") - def test_prov_service_read_location(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9246", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9246") + def test_prov_service_read_location(self, get_target_object, selected_testbed): + """ + Test to Read location in Provision Services + Unique marker:pytest -m "prov_api_read_loaction_test" + """ global location_id - resp = setup_prov_controller.get_location_by_id(location_id) + resp = get_target_object.prov_library_object.get_location_by_id(location_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_location_test + @pytest.mark.prov_api_edit_location_test @allure.title("Edit Location") - def test_prov_service_edit_location(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9248", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9248") + + def test_prov_service_edit_location(self, get_target_object, selected_testbed): + """ + Test to Edit the locations in Provision services + Unique markers: pytest -m "prov_api_edit_location_test" + """ # This to edit Location global location_id editing_payload = { @@ -364,19 +477,27 @@ class TestProvAPILocation(object): "state": "Andhra Pradesh", "type": "SERVICE" } - print(json.dumps(editing_payload)) - resp = setup_prov_controller.edit_location(editing_payload, location_id) + logging.info(json.dumps(editing_payload)) + resp = get_target_object.prov_library_object.edit_location(editing_payload, location_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_location_by_id(location_id) + resp = get_target_object.prov_library_object.get_location_by_id(location_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_location_test + @pytest.mark.prov_api_delete_location_test @allure.title("Delete Location") - def test_prov_service_delete_location(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9249", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9249") + + def test_prov_service_delete_location(self, get_target_object, selected_testbed): + """ + Test to Delete location in provision service + Unique marker: pytest -m "prov_api_delete_location_test" + + """ global location_id - resp = setup_prov_controller.delete_location(location_id) + resp = get_target_object.prov_library_object.delete_location(location_id) if resp.status_code != 200: assert False @@ -385,22 +506,33 @@ class TestProvAPILocation(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Venue API tests") class TestProvAPIVenue(object): # Venue related Test cases - @pytest.mark.prov_api_venue + @pytest.mark.prov_api_all_venue @allure.title("Get All Venues") - def test_get_venue(self, setup_prov_controller): - resp = setup_prov_controller.get_venue() + @allure.testcase(name="WIFI-9250", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9250") + + def test_get_venue(self, get_target_object): + """ + Test to get all venues in provision services + Unique marker:pytest -m "prov_api_all_venue" + """ + resp = get_target_object.prov_library_object.get_venue() assert resp.status_code == 200 - @pytest.mark.prov_api_venue_test + @pytest.mark.prov_api_create_venue_test @allure.title("Create Venue") - def test_prov_service_create_venue(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9252", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9252") + + def test_prov_service_create_venue(self, get_target_object, selected_testbed): """ Test the create venue in provision Service + Unique marker: pytest -m "prov_api_create_venue_test" """ global venue_id, entity_id payload = {"name": "Testing_prov", @@ -409,11 +541,11 @@ class TestProvAPIVenue(object): "notes": [{"note": "For testing Purposes through Automation"}], "parent": "0000-0000-0000" } - resp = setup_prov_controller.add_entity(payload) + resp = get_target_object.prov_library_object.add_entity(payload) if resp.status_code != 200: assert False entity = json.loads(resp.text) - print(entity) + logging.info(entity) entity_id = entity['id'] payload = { @@ -429,24 +561,38 @@ class TestProvAPIVenue(object): "parent": "", "rrm": "inherit" } - resp = setup_prov_controller.add_venue(payload) + resp = get_target_object.prov_library_object.add_venue(payload) if resp.status_code != 200: assert False venue = json.loads(resp.text) - print(venue) + logging.info(venue) venue_id = venue['id'] - @pytest.mark.prov_api_venue_test + @pytest.mark.prov_api_read_venue_test @allure.title("Read Venue") - def test_prov_service_read_venue(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9251", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9251") + + def test_prov_service_read_venue(self, get_target_object, selected_testbed): + """ + Test to Read venues in Provision services + Unique marker:pytest -m "prov_api_read_venue_test" + """ global venue_id - resp = setup_prov_controller.get_venue_by_id(venue_id) + resp = get_target_object.prov_library_object.get_venue_by_id(venue_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_venue_test + @pytest.mark.prov_api_edit_venue_test @allure.title("Edit Venue") - def test_prov_service_edit_venue(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9253", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9253") + + def test_prov_service_edit_venue(self, get_target_object, selected_testbed): + """ + Test to Edit venues in Provision Services + Unique marker:pytest -m "prov_api_edit_venue_test" + """ # This to edit venue global venue_id editing_payload = { @@ -457,23 +603,30 @@ class TestProvAPIVenue(object): "rrm": "inherit", "sourceIP": [] } - resp = setup_prov_controller.edit_venue(editing_payload, venue_id) + resp = get_target_object.prov_library_object.edit_venue(editing_payload, venue_id) if resp.status_code != 200: assert False venue = json.loads(resp.text) - print(venue) - resp = setup_prov_controller.get_venue_by_id(venue_id) + logging.info(venue) + resp = get_target_object.prov_library_object.get_venue_by_id(venue_id) if resp.status_code != 200: assert False - @pytest.mark.prov_api_venue_test + @pytest.mark.prov_api_delete_venue_test @allure.title("Delete Venue") - def test_prov_service_delete_venue(self, setup_prov_controller, testbed): + @allure.testcase(name="WIFI-9254", + url="https://telecominfraproject.atlassian.net/browse/WIFI-9254") + + def test_prov_service_delete_venue(self, get_target_object, selected_testbed): + """ + Test to Delete venue in Provision Service + Unique Marker:pytest -m "prov_api_delete_venue_test" + """ global venue_id, entity_id - resp = setup_prov_controller.delete_venue(venue_id) + resp = get_target_object.prov_library_object.delete_venue(venue_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.delete_entity(entity_id) + resp = get_target_object.prov_library_object.delete_entity(entity_id) if resp.status_code != 200: assert False @@ -481,19 +634,19 @@ class TestProvAPIVenue(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Maps API tests") class TestProvAPIMaps(object): @pytest.mark.prov_api_maps @allure.title("Get All Maps") - def test_read_all_map(self, setup_prov_controller): - resp = setup_prov_controller.get_map() + def test_read_all_map(self, get_target_object): + resp = get_target_object.prov_library_object.get_map() assert resp.status_code == 200 @pytest.mark.prov_api_maps @allure.title("Create Map") - def test_prov_service_create_map(self, setup_prov_controller, testbed): + def test_prov_service_create_map(self, get_target_object, selected_testbed): """ Test the create Map in provision Service """ @@ -530,24 +683,24 @@ class TestProvAPIMaps(object): "venue": "", "visibility": "public" } - resp = setup_prov_controller.add_map(payload) + resp = get_target_object.prov_library_object.add_map(payload) if resp.status_code != 200: assert False map = json.loads(resp.text) - print(map) + logging.info(map) map_id = map['id'] @pytest.mark.prov_api_maps @allure.title("Read Map") - def test_prov_service_read_map(self, setup_prov_controller, testbed): + def test_prov_service_read_map(self, get_target_object, selected_testbed): global map_id - resp = setup_prov_controller.get_map_by_id(map_id) + resp = get_target_object.prov_library_object.get_map_by_id(map_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_maps @allure.title("Edit Map") - def test_prov_service_edit_map(self, setup_prov_controller, testbed): + def test_prov_service_edit_map(self, get_target_object, selected_testbed): # This to edit Map global map_id editing_payload = { @@ -582,18 +735,18 @@ class TestProvAPIMaps(object): "venue": "", "visibility": "public" } - resp = setup_prov_controller.edit_map(editing_payload, map_id) + resp = get_target_object.prov_library_object.edit_map(editing_payload, map_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_map_by_id(map_id) + resp = get_target_object.prov_library_object.get_map_by_id(map_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_maps @allure.title("Delete Map") - def test_prov_service_delete_map(self, setup_prov_controller, testbed): + def test_prov_service_delete_map(self, get_target_object, selected_testbed): global map_id - resp = setup_prov_controller.delete_map(map_id) + resp = get_target_object.prov_library_object.delete_map(map_id) if resp.status_code != 200: assert False @@ -601,19 +754,19 @@ class TestProvAPIMaps(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Operator API tests") class TestProvAPIOperators(object): @pytest.mark.prov_api_operator_test @allure.title("Get All Operators") - def test_read_all_operator(self, setup_prov_controller): - resp = setup_prov_controller.get_operator() + def test_read_all_operator(self, get_target_object): + resp = get_target_object.prov_library_object.get_operator() assert resp.status_code == 200 @pytest.mark.prov_api_operator_test @allure.title("Create Operator") - def test_prov_service_create_operator(self, setup_prov_controller, testbed): + def test_prov_service_create_operator(self, get_target_object, selected_testbed): """ Test the create Operator in provision Service """ @@ -635,24 +788,24 @@ class TestProvAPIOperators(object): } ] } - resp = setup_prov_controller.add_operator(payload) + resp = get_target_object.prov_library_object.add_operator(payload) if resp.status_code != 200: assert False operator = json.loads(resp.text) - print(operator) + logging.info(operator) operator_id = operator['id'] @pytest.mark.prov_api_operator_test @allure.title("Read Operator") - def test_prov_service_read_operator(self, setup_prov_controller, testbed): + def test_prov_service_read_operator(self, get_target_object, selected_testbed): global operator_id - resp = setup_prov_controller.get_operator_by_id(operator_id) + resp = get_target_object.prov_library_object.get_operator_by_id(operator_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_operator_test @allure.title("Edit Operator") - def test_prov_service_edit_operator(self, setup_prov_controller, testbed): + def test_prov_service_edit_operator(self, get_target_object, selected_testbed): # This to edit operator global operator_id editing_payload = { @@ -667,18 +820,18 @@ class TestProvAPIOperators(object): "registrationId": "12345", "notes": [] } - resp = setup_prov_controller.edit_operator(editing_payload, operator_id) + resp = get_target_object.prov_library_object.edit_operator(editing_payload, operator_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_operator_by_id(operator_id) + resp = get_target_object.prov_library_object.get_operator_by_id(operator_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_operator_test @allure.title("Delete Operator") - def test_prov_service_delete_operator(self, setup_prov_controller, testbed): + def test_prov_service_delete_operator(self, get_target_object, selected_testbed): global operator_id - resp = setup_prov_controller.delete_operator(operator_id) + resp = get_target_object.prov_library_object.delete_operator(operator_id) if resp.status_code != 200: assert False @@ -686,13 +839,13 @@ class TestProvAPIOperators(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Service Class API tests") class TestProvAPIServiceClass(object): @pytest.mark.prov_api_service_class_test @allure.title("Get All Service class of an Operator") - def test_prov_service_read_all_service_class_on_operator(self, setup_prov_controller, testbed): + def test_prov_service_read_all_service_class_on_operator(self, get_target_object, selected_testbed): """ Test the create Service class in provision Service (USE CASE) """ @@ -714,22 +867,22 @@ class TestProvAPIServiceClass(object): } ] } - resp = setup_prov_controller.add_operator(payload) + resp = get_target_object.prov_library_object.add_operator(payload) if resp.status_code != 200: assert False operator = json.loads(resp.text) - print(operator) + logging.info(operator) operator_id = operator['id'] - resp = setup_prov_controller.get_operator_by_id(operator_id) + resp = get_target_object.prov_library_object.get_operator_by_id(operator_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_service_class_by_operator_id(operator_id) + resp = get_target_object.prov_library_object.get_service_class_by_operator_id(operator_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_service_class_test @allure.title("Create Service class") - def test_prov_service_create_service_class(self, setup_prov_controller, testbed): + def test_prov_service_create_service_class(self, get_target_object, selected_testbed): global operator_id, service_class_id payload = { "name": "Testing Purposes through API Automation", @@ -745,24 +898,24 @@ class TestProvAPIServiceClass(object): ], "operatorId": operator_id } - resp = setup_prov_controller.add_service_class(payload) + resp = get_target_object.prov_library_object.add_service_class(payload) if resp.status_code != 200: assert False service_class = json.loads(resp.text) - print(service_class) + logging.info(service_class) service_class_id = service_class['id'] @pytest.mark.prov_api_service_class_test @allure.title("Read Service class") - def test_prov_service_read_service_class(self, setup_prov_controller, testbed): + def test_prov_service_read_service_class(self, get_target_object, selected_testbed): global operator_id, service_class_id - resp = setup_prov_controller.get_service_class_by_id(service_class_id) + resp = get_target_object.prov_library_object.get_service_class_by_id(service_class_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_service_class_test @allure.title("Edit Service class") - def test_prov_service_edit_service_class(self, setup_prov_controller, testbed): + def test_prov_service_edit_service_class(self, get_target_object, selected_testbed): # This to edit operator global operator_id, service_class_id editing_payload = { @@ -774,21 +927,21 @@ class TestProvAPIServiceClass(object): "currency": "USD", "notes": [] } - resp = setup_prov_controller.edit_service_class(editing_payload, service_class_id) + resp = get_target_object.prov_library_object.edit_service_class(editing_payload, service_class_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_service_class_by_id(service_class_id) + resp = get_target_object.prov_library_object.get_service_class_by_id(service_class_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_service_class_test @allure.title("Delete Service class") - def test_prov_service_delete_service_class(self, setup_prov_controller, testbed): + def test_prov_service_delete_service_class(self, get_target_object, selected_testbed): global operator_id, service_class_id - resp = setup_prov_controller.delete_service_class(service_class_id) + resp = get_target_object.prov_library_object.delete_service_class(service_class_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.delete_operator(operator_id) + resp = get_target_object.prov_library_object.delete_operator(operator_id) if resp.status_code != 200: assert False @@ -796,19 +949,19 @@ class TestProvAPIServiceClass(object): @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owprov_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Provisioning Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Provisioning Service Tests") @allure.sub_suite("Provisioning Service Configuration API tests") class TestProvAPIConfigurations(object): @pytest.mark.prov_api_config @allure.title("Get All Configurations") - def test_read_all_configurations(self, setup_prov_controller): - resp = setup_prov_controller.get_configuration() + def test_read_all_configurations(self, get_target_object): + resp = get_target_object.prov_library_object.get_configuration() assert resp.status_code == 200 @pytest.mark.prov_api_config_test @allure.title("Create Configuration") - def test_prov_service_create_configuration(self, setup_prov_controller, testbed): + def test_prov_service_create_configuration(self, get_target_object, selected_testbed): """ Test the create configuration in provision Service """ @@ -1006,25 +1159,25 @@ class TestProvAPIConfigurations(object): } ] } - resp = setup_prov_controller.add_configuration(payload) + resp = get_target_object.prov_library_object.add_configuration(payload) if resp.status_code != 200: assert False configuration = json.loads(resp.text) - print(configuration) + logging.info(configuration) configuration_id = configuration['id'] modified = configuration['modified'] @pytest.mark.prov_api_config_test @allure.title("Read Configuration") - def test_prov_service_read_configuration(self, setup_prov_controller, testbed): + def test_prov_service_read_configuration(self, get_target_object, selected_testbed): global configuration_id - resp = setup_prov_controller.get_configuration_by_id(configuration_id) + resp = get_target_object.prov_library_object.get_configuration_by_id(configuration_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_config_test @allure.title("Edit Configuration") - def test_prov_service_edit_configuration(self, setup_prov_controller, testbed): + def test_prov_service_edit_configuration(self, get_target_object, selected_testbed): # This to edit configuration global configuration_id, modified editing_payload = { @@ -1238,17 +1391,17 @@ class TestProvAPIConfigurations(object): "variables": [], "venue": "" } - resp = setup_prov_controller.edit_configuration(editing_payload, configuration_id) + resp = get_target_object.prov_library_object.edit_configuration(editing_payload, configuration_id) if resp.status_code != 200: assert False - resp = setup_prov_controller.get_configuration_by_id(configuration_id) + resp = get_target_object.prov_library_object.get_configuration_by_id(configuration_id) if resp.status_code != 200: assert False @pytest.mark.prov_api_config_test @allure.title("Delete Configuration") - def test_prov_service_delete_configuration(self, setup_prov_controller, testbed): + def test_prov_service_delete_configuration(self, get_target_object, selected_testbed): global configuration_id - resp = setup_prov_controller.delete_configuration(configuration_id) + resp = get_target_object.prov_library_object.delete_configuration(configuration_id) if resp.status_code != 200: assert False \ No newline at end of file diff --git a/tests/controller_tests/ucentral_gateway/test_securityservice.py b/tests/controller_tests/ucentral_gateway/test_securityservice.py index 9a1af98f3..4583aea9a 100644 --- a/tests/controller_tests/ucentral_gateway/test_securityservice.py +++ b/tests/controller_tests/ucentral_gateway/test_securityservice.py @@ -13,17 +13,20 @@ import allure @pytest.mark.ow_sdk_tests @pytest.mark.ow_sdk_load_tests @pytest.mark.owsec_api_tests -@allure.parent_suite("OpenWifi SDK Tests") -@allure.suite("OpenWifi Security Service Tests") +@allure.parent_suite("SDK Tests") +@allure.suite("Security Service Tests") class TestUcentralSecService(object): @allure.title("Get System Endpoints") - def test_secservice_system_endpoints(self, setup_controller): + @allure.testcase(name="WIFI-3450", + url="https://telecominfraproject.atlassian.net/browse/WIFI-3450") + @pytest.mark.system_endpoints + def test_secservice_system_endpoints(self, get_target_object): """ - Test the system endpoints to verify list of services present - WIFI-3449 + Test the system endpoints to verify list of services that are present + Unique marker:pytest -m "system endpoints" """ - resp = setup_controller.request("sec", "systemEndpoints", "GET", None, None) + resp = get_target_object.controller_library_object.request("sec", "systemEndpoints", "GET", None, None) body = resp.url + "," + str(resp.status_code) + ',' + resp.text #allure.attach(name="security systemEndpoints", body=body) @@ -55,14 +58,17 @@ class TestUcentralSecService(object): assert (num_services == 2) and (uri_present == 2) and (authtype_present == 2) @allure.title("Get Security Version") - def test_secservice_get_version(self, setup_controller): + @allure.testcase(name="WIFI-3451", + url="https://telecominfraproject.atlassian.net/browse/WIFI-3451") + @pytest.mark.security_versions + def test_secservice_get_version(self, get_target_object): """ Test the system endpoint to verify the version of the service - WIFI-3450 + Unique marker:pytest -m "security_version" """ params = {'command': 'info'} - resp = setup_controller.request("sec", "system", "GET", params, None) + resp = get_target_object.controller_library_object.request("sec", "system", "GET", params, None) body = resp.url + "," + str(resp.status_code) + ',' + resp.text #allure.attach(name="security get version result", body=body) @@ -75,15 +81,15 @@ class TestUcentralSecService(object): if system['version'] == '': assert False - @allure.title("Get Secutity Service Uptime") - def test_secservice_get_uptime(self, setup_controller): + @allure.title("Get Security Service Uptime") + def test_secservice_get_uptime(self, get_target_object): """ Test the system endpoint to verify the uptime of the service WIFI-3451 """ params = {'command': 'info'} - resp = setup_controller.request("sec", "system", "GET", params, None) + resp = get_target_object.controller_library_object.request("sec", "system", "GET", params, None) body = resp.url + "," + str(resp.status_code) + ',' + resp.text #allure.attach(name="security get uptime", body=body) if resp.status_code != 200: diff --git a/tests/e2e/UseCase/test_API_provision.py b/tests/e2e/UseCase/test_API_provision.py index cba139f22..3327051ad 100644 --- a/tests/e2e/UseCase/test_API_provision.py +++ b/tests/e2e/UseCase/test_API_provision.py @@ -1,258 +1,258 @@ -""" - - Provision Services Rest API Use Case Tests - -""" - -import string -import random - -import pytest -import json -import allure - - -@pytest.mark.owprov_api_tests -@pytest.mark.owprov_api_usecase -@allure.feature("SDK PROV REST API") -@allure.parent_suite("OpenWifi SDK Use Case Tests") -@allure.suite("OpenWifi Provisioning Service Tests") -@allure.sub_suite("Provisioning Service Use Case API tests") -class TestProvAPIUseCase(object): - - @pytest.mark.prov_api_usecase_test - @allure.title("Prov service Use case testcase") - def test_prov_service_use_case(self, setup_prov_controller, testbed): - """ - Test to create Entity and then creates child entity under it, - then location, venue with the before created location, contact, Inventory device under this child Entity and - deletes them at last - """ - payload = {"name": "Testing_prov", - "rrm": "inherit", - "description": "For testing Purposes through Automation", - "notes": [{"note": "For testing Purposes through Automation"}], - "parent": "0000-0000-0000" - } - print(json.dumps(payload)) - resp = setup_prov_controller.add_entity(payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create entity", body=body) - if resp.status_code != 200: - assert False - entitiy = json.loads(resp.text) - print(entitiy) - entity_id = entitiy['id'] - - resp = setup_prov_controller.get_entity_by_id(entity_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create device-verify", body=body) - if resp.status_code != 200: - assert False - - child_payload = { - "name": "Child Entity testing_prov", - "deviceRules": { - "rrm": "inherit", - "rcOnly": "inherit", - "firmwareUpgrade": "inherit" - }, - "description": "Child Entity testing", - "notes": [ - { - "note": "Child Entity testing" - } - ], - "parent": entity_id - } - print(json.dumps(child_payload)) - resp = setup_prov_controller.add_entity(child_payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create Child entity", body=body) - if resp.status_code != 200: - assert False - child_entity = json.loads(resp.text) - print(child_entity) - child_entity_id = child_entity['id'] - - resp = setup_prov_controller.get_entity_by_id(child_entity_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create child Entity-verify", body=body) - if resp.status_code != 200: - assert False - - location_payload = { - "name": "Testing usecase through Automation", - "description": "Testing usecase through Automation", - "type": "SERVICE", - "addressLines": [ - "Pedda Rushikonda", - "" - ], - "city": "Visakhapatnam", - "state": "Andhra Prdaesh", - "postal": "530045", - "country": "IN", - "buildingName": "Candela Technologies", - "mobiles": [], - "phones": [], - "geoCode": "", - "entity": child_entity_id - } - print(json.dumps(location_payload)) - resp = setup_prov_controller.add_location(location_payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create location", body=body) - if resp.status_code != 200: - assert False - location = json.loads(resp.text) - print(location) - location_id = location['id'] - - resp = setup_prov_controller.get_location_by_id(location_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create location-verify", body=body) - if resp.status_code != 200: - assert False - - venue_payload = { - "name": "Venue under child entity through Automation", - "deviceRules": { - "rrm": "inherit", - "rcOnly": "inherit", - "firmwareUpgrade": "inherit" - }, - "description": "Venue under child entity through Automation", - "parent": "", - "entity": child_entity_id, - "location": location_id - } - print(json.dumps(venue_payload)) - resp = setup_prov_controller.add_venue(venue_payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create venue", body=body) - if resp.status_code != 200: - assert False - venue = json.loads(resp.text) - print(venue) - venue_id = venue['id'] - - resp = setup_prov_controller.get_venue_by_id(venue_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create venue-verify", body=body) - if resp.status_code != 200: - assert False - - device_mac = "02:00:00:%02x:%02x:%02x" % (random.randint(0, 255), - random.randint(0, 255), - random.randint(0, 255)) - device_name = device_mac.replace(":", "") - inventory_payload = { - "serialNumber": device_name, - "name": "Device under child entity", - "deviceRules": { - "rrm": "inherit", - "rcOnly": "inherit", - "firmwareUpgrade": "inherit" - }, - "deviceType": "cig_wf194c4", - "devClass": "entity", - "description": "Device under child entity", - "entity": child_entity_id, - "venue": "", - "subscriber": "" - } - print(json.dumps(inventory_payload)) - resp = setup_prov_controller.add_device_to_inventory(device_name, inventory_payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create device", body=body) - if resp.status_code != 200: - assert False - devices = json.loads(resp.text) - print(devices) - - resp = setup_prov_controller.get_inventory_by_device(device_name) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create device-verify", body=body) - if resp.status_code != 200: - assert False - - contact_payload = { - "name": "Tip automation", - "type": "MANAGER", - "salutation": "", - "title": "", - "firstname": "Tip", - "lastname": "Automation", - "initials": "", - "primaryEmail": "tip@candelatech.com", - "secondaryEmail": "", - "mobiles": [], - "phones": [], - "description": "Creating contact through Automation testing", - "accessPIN": "", - "entity": child_entity_id - } - print(json.dumps(contact_payload)) - resp = setup_prov_controller.add_contact(contact_payload) - allure.attach(name="response: ", body=str(resp.json())) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create contact", body=body) - if resp.status_code != 200: - assert False - contact = json.loads(resp.text) - print(contact) - contact_id = contact['id'] - - resp = setup_prov_controller.get_contact_by_id(contact_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov create contact-verify", body=body) - if resp.status_code != 200: - assert False - - # Deleting Contact - resp = setup_prov_controller.delete_contact(contact_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created contact-delete", body=body) - if resp.status_code != 200: - assert False - - # Deleting Device from Inventory - resp = setup_prov_controller.delete_device_from_inventory(device_name) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created device-delete", body=body) - if resp.status_code != 200: - assert False - - # Deleting Venue - resp = setup_prov_controller.delete_venue(venue_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created venue-delete", body=body) - if resp.status_code != 200: - assert False - - # Deleting Location - resp = setup_prov_controller.delete_location(location_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created location-delete", body=body) - if resp.status_code != 200: - assert False - - # Deleting Child Entity - resp = setup_prov_controller.delete_entity(child_entity_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created Child Entity-delete", body=body) - if resp.status_code != 200: - assert False - - # Deleting Entity - resp = setup_prov_controller.delete_entity(entity_id) - body = resp.url + "," + str(resp.status_code) + ',' + resp.text - allure.attach(name="Prov created Entity-delete", body=body) - if resp.status_code != 200: - assert False \ No newline at end of file +# """ +# +# Provision Services Rest API Use Case Tests +# +# """ +# +# import string +# import random +# +# import pytest +# import json +# import allure +# +# +# @pytest.mark.owprov_api_tests +# @pytest.mark.owprov_api_usecase +# @allure.feature("SDK PROV REST API") +# @allure.parent_suite("OpenWifi SDK Use Case Tests") +# @allure.suite("OpenWifi Provisioning Service Tests") +# @allure.sub_suite("Provisioning Service Use Case API tests") +# class TestProvAPIUseCase(object): +# +# @pytest.mark.prov_api_usecase_test +# @allure.title("Prov service Use case testcase") +# def test_prov_service_use_case(self, setup_prov_controller, testbed): +# """ +# Test to create Entity and then creates child entity under it, +# then location, venue with the before created location, contact, Inventory device under this child Entity and +# deletes them at last +# """ +# payload = {"name": "Testing_prov", +# "rrm": "inherit", +# "description": "For testing Purposes through Automation", +# "notes": [{"note": "For testing Purposes through Automation"}], +# "parent": "0000-0000-0000" +# } +# print(json.dumps(payload)) +# resp = setup_prov_controller.add_entity(payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create entity", body=body) +# if resp.status_code != 200: +# assert False +# entitiy = json.loads(resp.text) +# print(entitiy) +# entity_id = entitiy['id'] +# +# resp = setup_prov_controller.get_entity_by_id(entity_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create device-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# child_payload = { +# "name": "Child Entity testing_prov", +# "deviceRules": { +# "rrm": "inherit", +# "rcOnly": "inherit", +# "firmwareUpgrade": "inherit" +# }, +# "description": "Child Entity testing", +# "notes": [ +# { +# "note": "Child Entity testing" +# } +# ], +# "parent": entity_id +# } +# print(json.dumps(child_payload)) +# resp = setup_prov_controller.add_entity(child_payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create Child entity", body=body) +# if resp.status_code != 200: +# assert False +# child_entity = json.loads(resp.text) +# print(child_entity) +# child_entity_id = child_entity['id'] +# +# resp = setup_prov_controller.get_entity_by_id(child_entity_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create child Entity-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# location_payload = { +# "name": "Testing usecase through Automation", +# "description": "Testing usecase through Automation", +# "type": "SERVICE", +# "addressLines": [ +# "Pedda Rushikonda", +# "" +# ], +# "city": "Visakhapatnam", +# "state": "Andhra Prdaesh", +# "postal": "530045", +# "country": "IN", +# "buildingName": "Candela Technologies", +# "mobiles": [], +# "phones": [], +# "geoCode": "", +# "entity": child_entity_id +# } +# print(json.dumps(location_payload)) +# resp = setup_prov_controller.add_location(location_payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create location", body=body) +# if resp.status_code != 200: +# assert False +# location = json.loads(resp.text) +# print(location) +# location_id = location['id'] +# +# resp = setup_prov_controller.get_location_by_id(location_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create location-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# venue_payload = { +# "name": "Venue under child entity through Automation", +# "deviceRules": { +# "rrm": "inherit", +# "rcOnly": "inherit", +# "firmwareUpgrade": "inherit" +# }, +# "description": "Venue under child entity through Automation", +# "parent": "", +# "entity": child_entity_id, +# "location": location_id +# } +# print(json.dumps(venue_payload)) +# resp = setup_prov_controller.add_venue(venue_payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create venue", body=body) +# if resp.status_code != 200: +# assert False +# venue = json.loads(resp.text) +# print(venue) +# venue_id = venue['id'] +# +# resp = setup_prov_controller.get_venue_by_id(venue_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create venue-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# device_mac = "02:00:00:%02x:%02x:%02x" % (random.randint(0, 255), +# random.randint(0, 255), +# random.randint(0, 255)) +# device_name = device_mac.replace(":", "") +# inventory_payload = { +# "serialNumber": device_name, +# "name": "Device under child entity", +# "deviceRules": { +# "rrm": "inherit", +# "rcOnly": "inherit", +# "firmwareUpgrade": "inherit" +# }, +# "deviceType": "cig_wf194c4", +# "devClass": "entity", +# "description": "Device under child entity", +# "entity": child_entity_id, +# "venue": "", +# "subscriber": "" +# } +# print(json.dumps(inventory_payload)) +# resp = setup_prov_controller.add_device_to_inventory(device_name, inventory_payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create device", body=body) +# if resp.status_code != 200: +# assert False +# devices = json.loads(resp.text) +# print(devices) +# +# resp = setup_prov_controller.get_inventory_by_device(device_name) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create device-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# contact_payload = { +# "name": "Tip automation", +# "type": "MANAGER", +# "salutation": "", +# "title": "", +# "firstname": "Tip", +# "lastname": "Automation", +# "initials": "", +# "primaryEmail": "tip@candelatech.com", +# "secondaryEmail": "", +# "mobiles": [], +# "phones": [], +# "description": "Creating contact through Automation testing", +# "accessPIN": "", +# "entity": child_entity_id +# } +# print(json.dumps(contact_payload)) +# resp = setup_prov_controller.add_contact(contact_payload) +# allure.attach(name="response: ", body=str(resp.json())) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create contact", body=body) +# if resp.status_code != 200: +# assert False +# contact = json.loads(resp.text) +# print(contact) +# contact_id = contact['id'] +# +# resp = setup_prov_controller.get_contact_by_id(contact_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov create contact-verify", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Contact +# resp = setup_prov_controller.delete_contact(contact_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created contact-delete", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Device from Inventory +# resp = setup_prov_controller.delete_device_from_inventory(device_name) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created device-delete", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Venue +# resp = setup_prov_controller.delete_venue(venue_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created venue-delete", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Location +# resp = setup_prov_controller.delete_location(location_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created location-delete", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Child Entity +# resp = setup_prov_controller.delete_entity(child_entity_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created Child Entity-delete", body=body) +# if resp.status_code != 200: +# assert False +# +# # Deleting Entity +# resp = setup_prov_controller.delete_entity(entity_id) +# body = resp.url + "," + str(resp.status_code) + ',' + resp.text +# allure.attach(name="Prov created Entity-delete", body=body) +# if resp.status_code != 200: +# assert False \ No newline at end of file diff --git a/tests/e2e/advanced/air_time_fairness_test/wpa2_personal/test_bridge_air_time_fairness.py b/tests/e2e/advanced/air_time_fairness_test/wpa2_personal/test_bridge_air_time_fairness.py index cd12329bb..c06a3ea8d 100644 --- a/tests/e2e/advanced/air_time_fairness_test/wpa2_personal/test_bridge_air_time_fairness.py +++ b/tests/e2e/advanced/air_time_fairness_test/wpa2_personal/test_bridge_air_time_fairness.py @@ -18,18 +18,23 @@ setup_params_general = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Air Time Fairness Test") +@allure.parent_suite("Air Time Fairness Test") +@allure.suite("BRIDGE Mode") +@allure.sub_suite("WPA2 Personal Security") +@pytest.mark.usefixtures("setup_configuration") class TestAtfBridge(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6394", name="WIFI-6394") @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_2g + @allure.title("Test for station 1 green field mode and station 2 with attenuation 30 dB 2.4 GHz") def test_atf_sta1_greenfieldmode_sta2_atten30dB_2g(self, lf_test, lf_tools, station_names_twog): lf_tools.reset_scenario() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] @@ -66,6 +71,7 @@ class TestAtfBridge(object): @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_2g + @allure.title("Test for station 1 green field mode and station 2 legacy mode 2.4 GHz") def test_atf_sta1_greenfieldmode_sta2_legacymode_2g(self, lf_test, lf_tools, station_names_twog): lf_tools.reset_scenario() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] @@ -97,6 +103,7 @@ class TestAtfBridge(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_5g + @allure.title("Test for station 1 green field mode and station 2 with attenuation 30 dB 5 GHz") def test_atf_sta1_greenfieldmode_sta2_atten30dB_5g(self, lf_test, lf_tools, station_names_fiveg): lf_tools.reset_scenario() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] @@ -135,6 +142,7 @@ class TestAtfBridge(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_5g + @allure.title("Test for station 1 green field mode and station 2 legacy mode 5 GHz") def test_atf_sta1_greenfieldmode_sta2_legacymode_5g(self, lf_test, lf_tools, station_names_fiveg): lf_tools.reset_scenario() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] diff --git a/tests/e2e/advanced/conftest.py b/tests/e2e/advanced/conftest.py index 6a2a5207e..e9dab7c65 100644 --- a/tests/e2e/advanced/conftest.py +++ b/tests/e2e/advanced/conftest.py @@ -1,128 +1,40 @@ -import os -import sys - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') - -from controller.controller_1x.controller import ProfileUtility -from controller.controller_2x.controller import UProfileUtility -from controller.controller_3x.controller import CController -import time -from lanforge.lf_tests import RunTest -from lanforge.lf_tools import ChamberView -import pytest import allure - - -@pytest.fixture(scope="session") -def instantiate_profile(request): - if request.config.getoption("1.x"): - yield ProfileUtility - elif request.config.getoption("cc.1"): - yield CController - else: - yield UProfileUtility - - -@pytest.fixture(scope="session") -def create_lanforge_chamberview(lf_tools): - scenario_object, scenario_name = lf_tools.Chamber_View() - return scenario_name - - -@pytest.fixture(scope="session") -def setup_vlan(): - vlan_id = [100] - allure.attach(body=str(vlan_id), name="VLAN Created: ") - yield vlan_id[0] - - +import pytest +import logging @pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtures_ver, - instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info, - run_lf, cc_1, lf_reports): - lf_tools.reset_scenario() - param = dict(request.param) +def setup_configuration(request, get_markers, get_target_object, run_lf): + # Predefined selected markers and selected configuration - # VLAN Setup - if request.param["mode"] == "VLAN": + conf = dict(request.param) + configuration = conf.copy() + requested_combination = [] + for key in get_markers: + if get_markers[key]: + requested_combination.append(get_markers[key]) - vlan_list = list() - refactored_vlan_list = list() - ssid_modes = request.param["ssid_modes"].keys() - for mode in ssid_modes: - for ssid in range(len(request.param["ssid_modes"][mode])): - if "vlan" in request.param["ssid_modes"][mode][ssid]: - vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) - else: - pass - if vlan_list: - [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] - vlan_list = refactored_vlan_list - for i in range(len(vlan_list)): - if vlan_list[i] > 4095 or vlan_list[i] < 1: - vlan_list.pop(i) - if request.param["mode"] == "VLAN": - lf_tools.add_vlan(vlan_ids=vlan_list) - print("fixture version ", fixtures_ver) - if cc_1: - return_var = fixtures_ver.setup_profiles(request, param, run_lf, instantiate_profile, get_configuration, - get_markers, - lf_tools, lf_reports) - else: - return_var = fixtures_ver.setup_profiles(request, param, setup_controller, testbed, get_equipment_ref, - instantiate_profile, - get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, - radius_accounting_info, run_lf=run_lf) - - yield return_var + # Method to setup the basic configuration + data = {} + if not run_lf: + data = get_target_object.setup_basic_configuration(configuration=configuration, + requested_combination=requested_combination) + logging.info("dut_data after config applied: " + str(data)) + yield data -@pytest.fixture(scope="session") -def station_names_twog(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i)) - yield station_names +@pytest.fixture(scope="function") +def check_connectivity(request, get_testbed_details, get_target_object, run_lf): + def collect_logs(): + for i in range(len(get_testbed_details["device_under_tests"])): + ret_val = get_target_object.get_dut_library_object().ubus_call_ucentral_status(idx=i, attach_allure=True, + retry=10) + if not ret_val["connected"] or ret_val["connected"] is None: + ap_logs = get_target_object.get_dut_library_object().get_dut_logs() + allure.attach(name='Logs - ' + get_testbed_details["device_under_tests"][i]["identifier"], + body=str(ap_logs)) + allure.attach(name='Device : ' + get_testbed_details["device_under_tests"][i]["identifier"] + + " is connected after Test", body="") -@pytest.fixture(scope="session") -def station_names_fiveg(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def num_stations(request): - num_sta = int(request.config.getini("num_stations")) - yield num_sta - - -@pytest.fixture(scope="class") -def get_vif_state(get_apnos, get_configuration): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") - vif_config = list(ap_ssh.get_vif_config_ssids()) - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - vif_config.sort() - allure.attach(name="vif_state", body=str(vif_state)) - yield vif_state - -@pytest.fixture(scope="class") -def get_vlan_list(get_apnos, get_configuration): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") - vlan_list = list(ap_ssh.get_vlan()) - vlan_list.sort() - allure.attach(name="vlan_list", body=str(vlan_list)) - yield vlan_list - + if not run_lf: + request.addfinalizer(collect_logs) diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_bridge_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_bridge_mode.py index d114fc025..2e9fe625b 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_bridge_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_bridge_mode.py @@ -37,12 +37,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE open security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoBridge(object): """ Downlink MU-MIMO Test: Bridge Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_nat_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_nat_mode.py index 84acd3b15..91a11e528 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_nat_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE open security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: NAT MODE diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_vlan_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_vlan_mode.py index d4116a025..7ddb21598 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/open/test_vlan_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/open/test_vlan_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN MODE open security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoVlan(object): """ Downlink MU-MIMO Test: VLAN Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_bridge_mode.py index 0515feba7..bff56d85a 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_bridge_mode.py @@ -37,12 +37,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE wpa2_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoBridge(object): """ Downlink MU-MIMO Test: Bridge Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_nat_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_nat_mode.py index caef631d7..d34d23105 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE wpa2_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: nat Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_vlan_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_vlan_mode.py index 4945758fe..1b24d12a8 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa2_personal/test_vlan_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN MODE wpa2_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: VLAN Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_bridge_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_bridge_mode.py index 9da9ad2be..0f3e998cc 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_bridge_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_bridge_mode.py @@ -37,12 +37,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE wpa3_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoBridge(object): """ Downlink MU-MIMO Test: Bridge Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_nat_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_nat_mode.py index 325319969..afa02678c 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_nat_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE wpa3_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: NAT Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_vlan_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_vlan_mode.py index 2bc956a38..32064d912 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_vlan_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa3_personal/test_vlan_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN MODE wpa3_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: VLAN Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_bridge_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_bridge_mode.py index 228124fa2..82cae9c22 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_bridge_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_bridge_mode.py @@ -37,12 +37,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE wpa_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoBridge(object): """ Downlink MU-MIMO Test: Bridge Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_nat_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_nat_mode.py index 15f206179..11e59bb89 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_nat_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE wpa_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: NAT Mode diff --git a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_vlan_mode.py b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_vlan_mode.py index 2c058dadd..92b8cfa8c 100644 --- a/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_vlan_mode.py +++ b/tests/e2e/advanced/downlink_mu_mimo_test/wpa_personal/test_vlan_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN MODE wpa_personal security and Downlink MU_MIMO Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMuMimoNat(object): """ Downlink MU-MIMO Test: VLAN Mode diff --git a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_bridge_association_disassociation.py b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_bridge_association_disassociation.py index 25ac78f11..3d3d7aea3 100644 --- a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_bridge_association_disassociation.py +++ b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_bridge_association_disassociation.py @@ -1,11 +1,14 @@ +""" + + Multi Association and Disassociation: BRIDGE Mode + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge" + +""" + import pytest import allure -import os -import time -import pandas as pd -import threading -pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, pytest.mark.bridge] +pytestmark = [pytest.mark.advance, pytest.mark.multi_assoc_disassoc_tests, pytest.mark.bridge, pytest.mark.wpa2_personal] setup_params_general = { "mode": "BRIDGE", @@ -19,320 +22,91 @@ setup_params_general = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.parent_suite("Multi Association and Disassociation Tests") +@allure.suite("WPA2 Personal Security") +@allure.sub_suite("Bridge Mode") +@allure.feature("UDP upload") +@pytest.mark.usefixtures("setup_configuration") class TestMultiAssoDisassoBridge(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5691", name="WIFI-5691") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_upload_2g - def test_multi_station_udp_upload_2g(self, lf_test, lf_tools): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 2.4Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable uplink 4 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G") + def test_multi_asso_disasso_udp_upload_nss2_2g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and twog and udp_upload_2g" + """ mode = "BRIDGE" vlan = 1 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_upload_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 4 Mbps so traffic for each station should be 3.96 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, dut_data=setup_configuration, + mode = mode, vlan=vlan, instance_name="udp_upload_2g", + traffic_direction="upload", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5692", name="WIFI-5692") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_download_2g - def test_multi_station_udp_download_2g(self, lf_test, lf_tools): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 2.4Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable downlink 4 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 2.4G") + def test_multi_asso_disasso_udp_download_nss2_2g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and twog and udp_download_2g" + """ mode = "BRIDGE" vlan = 1 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - time.sleep(10) - sta_list = lf_tools.get_station_list() - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_download_2g", mode=mode, vlan_id=vlan, - download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 4 Mbps so traffic for each station should be 3.96 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_2g", + traffic_direction="download", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5693", name="WIFI-5693") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_upload_5g - def test_multi_station_udp_upload_5g(self, lf_test, lf_tools): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 5Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable uplink 8 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 5G") + def test_multi_asso_disasso_udp_upload_nss2_5g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and fiveg and udp_upload_5g" + """ mode = "BRIDGE" vlan = 1 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_upload_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 8 Mbps so traffic for each station should be 7.92 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_upload_5g", + traffic_direction="upload", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5694", name="WIFI-5694") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_download_5g - def test_multi_station_udp_download_5g(self, lf_test, lf_tools): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 5Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable downlink 8 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 5G") + def test_multi_asso_disasso_udp_download_nss2_5g(self, get_test_library, setup_configuration,check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and fiveg and udp_download_5g" + """ mode = "BRIDGE" vlan = 1 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_download_5g", mode=mode, vlan_id=vlan, - download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 8 Mbps so traffic for each station should be 7.92 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_5g", + traffic_direction="download", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription diff --git a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_nat_association_disassociation.py b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_nat_association_disassociation.py index c0b6e05e7..ae8696160 100644 --- a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_nat_association_disassociation.py +++ b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_nat_association_disassociation.py @@ -1,11 +1,14 @@ +""" + + Multi Association and Disassociation: NAT Mode + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat" + +""" + import pytest import allure -import os -import time -import pandas as pd -import threading -#pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, pytest.mark.nat] +pytestmark = [pytest.mark.advance, pytest.mark.multi_assoc_disassoc_tests, pytest.mark.nat, pytest.mark.wpa2_personal] setup_params_general = { "mode": "NAT", @@ -19,319 +22,91 @@ setup_params_general = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.parent_suite("Multi Association and Disassociation Tests") +@allure.suite("WPA2 Personal Security") +@allure.sub_suite("Nat Mode") +@allure.feature("UDP upload") +@pytest.mark.usefixtures("setup_configuration") class TestMultiAssoDisassoNat(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5848", name="WIFI-5848") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_upload_2g - def test_multi_station_NAT_udp_upload_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 2.4Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable uplink 4 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G") + def test_multi_asso_disasso_NAT_udp_upload_nss2_2g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and twog and udp_upload_2g" + """ mode = "NAT" vlan = 1 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_upload_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 4 Mbps so traffic for each station should be 3.96 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, dut_data=setup_configuration, + mode = mode, vlan=vlan, instance_name="udp_upload_2g", + traffic_direction="upload", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5870", name="WIFI-5870") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_download_2g - def test_multi_station_NAT_udp_download_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 2.4Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable downlink 4 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 2.4G") + def test_multi_asso_disasso_NAT_udp_download_nss2_2g(self, get_test_library, setup_configuration): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and twog and udp_download_2g" + """ mode = "NAT" vlan = 1 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_download_2g", mode=mode, vlan_id=vlan, - download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 4 Mbps so traffic for each station should be 3.96 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_2g", + traffic_direction="download", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5871", name="WIFI-5871") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_upload_5g - def test_multi_station_NAT_udp_upload_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 5Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable uplink 8 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 5G") + def test_multi_asso_disasso_NAT_udp_upload_nss2_5g(self, get_test_library, setup_configuration): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and fiveg and udp_upload_5g" + """ mode = "NAT" vlan = 1 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_upload_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 8 Mbps so traffic for each station should be 7.92 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_upload_5g", + traffic_direction="upload", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5872", name="WIFI-5872") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_download_5g - def test_multi_station_NAT_udp_download_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - allure.attach(name="Definition", - body="Multiple association/disassociation stability test intends to measure stability of Wi-Fi device " \ - "under a dynamic environment with frequent change of connection status.") - allure.attach(name="Procedure", - body="This test case definition states that we Create 16 stations on 5Ghz radio and all of these 16 stations should be on same radio." \ - " Run Wifi-capacity test for first 8 stations. " \ - "8 stations are picked for sending/receiving packets while the other 8 STAs are picked to do a dis-association/re-association process during the test" \ - " Enable downlink 8 Mbps UDP flow from DUT to each of the 8 traffic stations" \ - "Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.") - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 5G") + def test_multi_asso_disasso_NAT_udp_download_nss2_5g(self, get_test_library, setup_configuration): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and fiveg and udp_download_5g" + """ mode = "NAT" vlan = 1 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_NAT_download_5g", mode=mode, vlan_id=vlan, - download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - allure.attach(name="Pass Fail Criteria", - body="UDP traffic rate is at least 99% of the configured rate for each station. Here configured " \ - "traffic rate is 8 Mbps so traffic for each station should be 7.92 Mbps ") - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_5g", + traffic_direction="download", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - allure.attach(name="Csv Data", body=str(csv_val)) - if pass_fail.count(0) == 0: - print("Test passed successfully") - assert True - else: - print(" valueTest failed due to lesser") - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription diff --git a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_vlan_association_disassociation.py b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_vlan_association_disassociation.py index cfa7a6d1f..e65932ae3 100644 --- a/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_vlan_association_disassociation.py +++ b/tests/e2e/advanced/multi_association_disassociation/wpa2_personal/test_vlan_association_disassociation.py @@ -1,11 +1,14 @@ +""" + + Multi Association and Disassociation: BRIDGE Mode + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan" + +""" + import pytest import allure -import os -import time -import pandas as pd -import threading -#pytestmark = [pytest.mark.advance, pytest.mark.multiassodisasso, pytest.mark.vlan] +pytestmark = [pytest.mark.advance, pytest.mark.multi_assoc_disassoc_tests, pytest.mark.vlan, pytest.mark.wpa2_personal] setup_params_general = { "mode": "VLAN", @@ -19,271 +22,91 @@ setup_params_general = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.parent_suite("Multi Association and Disassociation Tests") +@allure.suite("WPA2 Personal Security") +@allure.sub_suite("Vlan Mode") +@allure.feature("UDP upload") +@pytest.mark.usefixtures("setup_configuration") class TestMultiAssoDisassoVlan(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5873", name="WIFI-5873") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_upload_2g - def test_multi_station_VLAN_udp_upload_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G") + def test_multi_asso_disasso_VLAN_udp_upload_2g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and twog and udp_upload_2g" + """ mode = "VLAN" vlan = 100 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_upload_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="4Mbps", protocol="UDP-IPv4", duration="120000", create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_upload_2g", + traffic_direction="upload", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - if pass_fail.count(0) == 0: - print("Test passed successfully") - allure.attach(name="Csv Data", body=str(csv_val)) - assert True - else: - print(" valueTest failed due to lesser") - allure.attach(name="Csv Data", body=str(csv_val)) - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5874", name="WIFI-5874") - @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.udp_download_2g - def test_multi_station_VLAN_udp_download_2g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 2.4G") + def test_multi_asso_disasso_VLAN_udp_download_nss2_2g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and twog and udp_download_2g" + """ mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_download_2g", mode=mode, vlan_id=vlan, - download_rate="4Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 4 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + vlan = 1 + result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_2g", + traffic_direction="download", traffic_rate="4Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - if pass_fail.count(0) == 0: - print("Test passed successfully") - allure.attach(name="Csv Data", body=str(csv_val)) - assert True - else: - print(" valueTest failed due to lesser") - allure.attach(name="Csv Data", body=str(csv_val)) - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5875", name="WIFI-5875") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_upload_5g - def test_multi_station_VLAN_udp_upload_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP upload 5G") + def test_multi_asso_disasso_VLAN_udp_upload_nss2_5g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and fiveg and udp_upload_5g" + """ mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['ul_rate_sel: Per-Station Upload Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_upload_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="8Mbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="upload") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + vlan = 1 + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_upload_5g", + traffic_direction="upload", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - if pass_fail.count(0) == 0: - print("Test passed successfully") - allure.attach(name="Csv Data", body=str(csv_val)) - assert True - else: - print(" valueTest failed due to lesser") - allure.attach(name="Csv Data", body=str(csv_val)) - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5876", name="WIFI-5876") - @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.udp_download_5g - def test_multi_station_VLAN_udp_download_5g(self, lf_test, lf_tools, create_lanforge_chamberview_dut): - # run wifi capacity test here - def thread_fun(station_list): - print(station_list) - time.sleep(60) - lf_tools.admin_up_down(sta_list=station_list, option="down") - print("stations down") - time.sleep(10) - lf_tools.admin_up_down(sta_list=station_list, option="up") - print("stations up") - - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Multi Association and Disassociation for UDP download 5G") + def test_multi_asso_disasso_VLAN_udp_download_nss2_5g(self, get_test_library, setup_configuration, check_connectivity): + """ + pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and fiveg and udp_download_5g" + """ mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations=16, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - sta_list = lf_tools.get_station_list() - print(sta_list) - lf_tools.admin_up_down(sta_list=sta_list, option="up") - sel_stations = ",".join(sta_list[0:8]) - val = [['dl_rate_sel: Per-Station Download Rate:']] - thr1 = threading.Thread(target=thread_fun, args=(sta_list[8:16],)) - thr1.start() - wct_obj = lf_test.wifi_capacity(instance_name="udp_VLAN_download_5g", mode=mode, vlan_id=vlan, - download_rate="8Mbps", stations=sel_stations, raw_lines=val, batch_size="8", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", - create_stations=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option="download") - print(type(csv_val)) - print(csv_val) - pass_value = 8 * 0.99 - print("pass value ", pass_value) - pass_fail = [] - if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + vlan = 1 + result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16, + dut_data=setup_configuration, + mode=mode, vlan=vlan, instance_name="udp_download_5g", + traffic_direction="download", traffic_rate="8Mbps") + if result: + assert True else: - for i in csv_val.values(): - if i >= pass_value: - pass_fail.append(1) - else: - pass_fail.append(0) - if pass_fail.count(0) == 0: - print("Test passed successfully") - allure.attach(name="Csv Data", body=str(csv_val)) - assert True - else: - print(" valueTest failed due to lesser") - allure.attach(name="Csv Data", body=str(csv_val)) - assert False - print("Test Completed... Cleaning up Stations") + assert False, discription diff --git a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_bridge_multi_sta_performance.py b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_bridge_multi_sta_performance.py index 4790a7a10..bc5d11bf0 100644 --- a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_bridge_multi_sta_performance.py +++ b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_bridge_multi_sta_performance.py @@ -1,10 +1,12 @@ +""" + Test Multi-Station Performance: Bridge Mode + pytest -m multistaperf +""" import pytest import allure -import os import time -import pandas as pd -pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.bridge] +pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.bridge, pytest.mark.report] setup_params_general = { "mode": "BRIDGE", @@ -15,42 +17,50 @@ setup_params_general = { ] }, "rf": { - "5G":{ + "5G": { "channel-width": 80}, - "2G":{ + "2G": { "channel-width": 20} }, "radius": False } + +@allure.feature("BRIDGE MODE MULTI-STATION PERFORMANCE") +@allure.parent_suite("MULTI STATION PERFORMANCE") +@allure.suite(suite_name="BRIDGE MODE") +@allure.sub_suite(sub_suite_name="WPA2_personal MULTI STATION PERFORMANCE") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaPerfBridge(object): - + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5733", name="WIFI-5733") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss1_2g - def test_multi_station_tcp_upload_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_upload_10dB_dis_nss1_2g + def test_multi_station_udp_upload_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] - print(radio_name) - print(station_name) + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] + print("radio:", radio_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -58,58 +68,71 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (35 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") - + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5844", name="WIFI-5844") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_2g - def test_multi_station_tcp_upload_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_upload_10dB_38dB_dis_nss1_2g + def test_multi_station_udp_upload_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) + station_name = get_test_library.twog_prefix sta = [] list_three_sta = [] for i in range(6): @@ -120,70 +143,86 @@ class TestMultiStaPerfBridge(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (30 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5877", name="WIFI-5877") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_tcp_upload_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_udp_upload_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) + station_name = get_test_library.twog_prefix sta = [] list_three_sta = [] for i in range(9): @@ -193,77 +232,92 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_38dB_48dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (25 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5881", name="WIFI-5881") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss1_2g - def test_multi_station_tcp_download_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_download_10dB_dis_nss1_2g + def test_multi_station_udp_download_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -271,54 +325,67 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (35 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5882", name="WIFI-5882") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_2g - def test_multi_station_tcp_download_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_download_10dB_38dB_dis_nss1_2g + def test_multi_station_udp_download_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -332,67 +399,82 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (30 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6083", name="WIFI-6083") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_tcp_download_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_udp_download_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -406,76 +488,92 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_38dB_48dB_dis_nss1_2g", mode=mode, + vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (25 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6086", name="WIFI-6086") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss1_5g - def test_multi_station_tcp_upload_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_upload_10dB_dis_nss1_5g + def test_multi_station_udp_upload_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -483,54 +581,69 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6087", name="WIFI-6087") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_5g - def test_multi_station_tcp_upload_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_upload_10dB_25dB_dis_nss1_5g + def test_multi_station_udp_upload_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -545,66 +658,81 @@ class TestMultiStaPerfBridge(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6088", name="WIFI-6088") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_tcp_upload_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_udp_upload_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -618,76 +746,91 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_50dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (200 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5878", name="WIFI-5878") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss1_5g - def test_multi_station_tcp_download_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_download_10dB_dis_nss1_5g + def test_multi_station_udp_download_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -695,54 +838,69 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5879", name="WIFI-5879") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_5g - def test_multi_station_tcp_download_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_download_10dB_25dB_dis_nss1_5g + def test_multi_station_udp_download_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -756,66 +914,81 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbpsps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5880", name="WIFI-5880") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_tcp_download_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_download_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_udp_download_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -829,77 +1002,91 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_50dB_dis_nss1_5g", mode=mode, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (200 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5883", name="WIFI-5883") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss2_2g - def test_multi_station_tcp_upload_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_upload_10dB_dis_nss2_2g + def test_multi_station_udp_upload_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] - print(radio_name) - print(station_name) + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] + print(radio_name, "\n", station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -907,54 +1094,67 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (70 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5887", name="WIFI-5887") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_2g - def test_multi_station_tcp_upload_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_upload_10dB_38dB_dis_nss2_2g + def test_multi_station_udp_upload_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -968,66 +1168,81 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (60 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5886", name="WIFI-5886") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_tcp_upload_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_udp_upload_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1041,76 +1256,91 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_50dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (50 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5890", name="WIFI-5890") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss2_2g - def test_multi_station_tcp_download_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_download_10dB_dis_nss2_2g + def test_multi_station_udp_download_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1118,54 +1348,67 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (70 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5889", name="WIFI-5889") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_2g - def test_multi_station_tcp_download_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_download_10dB_38dB_dis_nss2_2g + def test_multi_station_udp_download_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1179,66 +1422,81 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (60 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5888", name="WIFI-5888") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_tcp_download_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_udp_download_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1252,77 +1510,92 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_50dB_dis_nss2_2g", mode=mode, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (50 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5884", name="WIFI-5884") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss2_5g - def test_multi_station_tcp_upload_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_upload_10dB_dis_nss2_5g + def test_multi_station_udp_upload_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1330,54 +1603,69 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5885", name="WIFI-5885") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_5g - def test_multi_station_tcp_upload_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_upload_10dB_25dB_dis_nss2_5g + def test_multi_station_udp_upload_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1392,66 +1680,81 @@ class TestMultiStaPerfBridge(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_25dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5896", name="WIFI-5896") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_tcp_upload_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss2_5g + def test_multi_station_udp_upload_10dB_25dB_35dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1465,76 +1768,91 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_upload_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_upload_10dB_25dB_35dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (400 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5892", name="WIFI-5892") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss2_5g - def test_multi_station_tcp_download_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tps + @pytest.mark.udp_download_10dB_dis_nss2_5g + def test_multi_station_udp_download_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1542,54 +1860,69 @@ class TestMultiStaPerfBridge(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5891", name="WIFI-5891") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_5g - def test_multi_station_tcp_download_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsm + @pytest.mark.udp_download_10dB_25dB_dis_nss2_5g + def test_multi_station_udp_download_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1604,66 +1937,81 @@ class TestMultiStaPerfBridge(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_25dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-2) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5895", name="WIFI-5895") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_tcp_download_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.tpsml + @pytest.mark.udp_download_10dB_25dB_35dB_dis_nss2_5g + def test_multi_station_udp_download_10dB_25dB_35dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + get_test_library.client_disconnect(clean_l3_traffic=True) profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "BRIDGE" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1677,52 +2025,63 @@ class TestMultiStaPerfBridge(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_download_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_download_10dB_25dB_35dB_dis_nss2_5g", mode=mode, + vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (400 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") diff --git a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_nat_multi_sta_performance.py b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_nat_multi_sta_performance.py index aa745c618..c95251687 100644 --- a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_nat_multi_sta_performance.py +++ b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_nat_multi_sta_performance.py @@ -1,10 +1,12 @@ +""" + Test Multi-Station Performance: Nat Mode + pytest -m multistaperf +""" import pytest import allure -import os import time -import pandas as pd -# pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.nat] +pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.nat] setup_params_general = { "mode": "NAT", @@ -23,36 +25,42 @@ setup_params_general = { "radius": False } - +@allure.feature("NAT MODE MULTI-STATION PERFORMANCE") +@allure.parent_suite("MULTI STATION PERFORMANCE") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="WPA2_personal MULTI STATION PERFORMANCE") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaPerfNat(object): + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5897", name="WIFI-5897") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss1_2g - def test_multi_station_NAT_tcp_upload_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss1_2g + def test_multi_station_NAT_udp_upload_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -60,54 +68,68 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (35 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5898", name="WIFI-5898") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_2g - def test_multi_station_NAT_tcp_upload_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_dis_nss1_2g + def test_multi_station_NAT_udp_upload_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -122,69 +144,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (30 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5901", name="WIFI-5901") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_NAT_tcp_upload_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_NAT_udp_upload_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -198,79 +234,92 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_38dB_480dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (25 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5905", name="WIFI-5905") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss1_2g - def test_multi_station_NAT_tcp_download_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss1_2g + def test_multi_station_NAT_udp_download_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -278,57 +327,69 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (35 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title( + "NAT Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5906", name="WIFI-5906") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_2g - def test_multi_station_NAT_tcp_download_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_dis_nss1_2g + def test_multi_station_NAT_udp_download_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -343,70 +404,84 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (30 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title( + "NAT Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6084", name="WIFI-6084") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_NAT_tcp_download_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_NAT_udp_download_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -420,80 +495,93 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_38dB_48dB_dis_nss1_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (25 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6089", name="WIFI-6089") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss1_5g - def test_multi_station_NAT_tcp_upload_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss1_5g + def test_multi_station_NAT_udp_upload_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -501,57 +589,70 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6090", name="WIFI-6090") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_5g - def test_multi_station_NAT_tcp_upload_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_dis_nss1_5g + def test_multi_station_NAT_udp_upload_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -566,70 +667,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(csv_val["Up"])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6091", name="WIFI-6091") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_NAT_tcp_upload_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_NAT_udp_upload_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -643,80 +757,93 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_50dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (200 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5902", name="WIFI-5902") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss1_5g - def test_multi_station_NAT_tcp_download_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss1_5g + def test_multi_station_NAT_udp_download_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -724,57 +851,70 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5903", name="WIFI-5903") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_5g - def test_multi_station_NAT_tcp_download_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_25dB_dis_nss1_5g + def test_multi_station_NAT_udp_download_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -789,71 +929,82 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (250 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbpsps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") - + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5904", name="WIFI-5904") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_NAT_tcp_download_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_NAT_udp_download_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -867,81 +1018,94 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_50dB_dis_nss1_5g", mode=mode, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (200 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5907", name="WIFI-5907") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss2_2g - def test_multi_station_NAT_tcp_upload_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss2_2g + def test_multi_station_NAT_udp_upload_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, get_test_device_logs, + get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -949,57 +1113,68 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size="3", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (70 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5911", name="WIFI-5911") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_2g - def test_multi_station_NAT_tcp_upload_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_dis_nss2_2g + def test_multi_station_NAT_udp_upload_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1014,70 +1189,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (60 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5910", name="WIFI-5910") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_NAT_tcp_upload_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_NAT_udp_upload_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1091,80 +1279,93 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_50dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (50 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5914", name="WIFI-5914") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss2_2g - def test_multi_station_NAT_tcp_download_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss2_2g + def test_multi_station_NAT_udp_download_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1172,57 +1373,68 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (70 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5913", name="WIFI-5913") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_2g - def test_multi_station_NAT_tcp_download_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_dis_nss2_2g + def test_multi_station_NAT_udp_download_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1237,70 +1449,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (60 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5912", name="WIFI-5912") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_NAT_tcp_download_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_NAT_udp_download_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, + num_stations, get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1314,80 +1539,93 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 380) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 480) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_50dB_dis_nss2_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (50 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5908", name="WIFI-5908") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss2_5g - def test_multi_station_NAT_tcp_upload_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss2_5g + def test_multi_station_NAT_udp_upload_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1395,57 +1633,70 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5909", name="WIFI-5909") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_5g - def test_multi_station_NAT_tcp_upload_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_dis_nss2_5g + def test_multi_station_NAT_udp_upload_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1460,70 +1711,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_25dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5918", name="WIFI-5918") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_NAT_tcp_upload_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss2_5g + def test_multi_station_NAT_udp_upload_10dB_25dB_35dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1537,80 +1801,93 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_upload_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_upload_10dB_25dB_35dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="0Gbps", batch_size=batch_size, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (400 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Up"].values())[-1])) if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5916", name="WIFI-5916") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss2_5g - def test_multi_station_NAT_tcp_download_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss2_5g + def test_multi_station_NAT_udp_download_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3" - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) @@ -1618,57 +1895,70 @@ class TestMultiStaPerfNat(object): for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5915", name="WIFI-5915") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_5g - def test_multi_station_NAT_tcp_download_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_25dB_dis_nss2_5g + def test_multi_station_NAT_udp_download_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1683,70 +1973,83 @@ class TestMultiStaPerfNat(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_25dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (500 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") print("Test failed due to lesser value") - assert False + assert False, "Test failed due to lesser value" print("Test Completed... Cleaning up Stations") + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5917", name="WIFI-5917") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_NAT_tcp_download_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_25dB_35dB_dis_nss2_5g + def test_multi_station_NAT_udp_download_10dB_25dB_35dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] - mode = "NAT" + mode = "NAT-WAN" vlan = 1 batch_size = "3,6,9" - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") @@ -1760,57 +2063,67 @@ class TestMultiStaPerfNat(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_NAT_download_10dB_40dB_50dB_dis_nss2_5g", mode=mode, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_NAT_download_10dB_25dB_35dB_dis_nss2_5g", mode=mode, vlan_id=vlan, download_rate="1Gbps", batch_size=batch_size, - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + upload_rate="9.6Kbps", protocol="UDP-IPv4", duration="120000", sort="linear") - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - csv_val = lf_tools.read_csv_individual_station_throughput(dir_name=report_name, option=None, + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, individual_station_throughput=False, kpi_csv=True, file_name="/kpi.csv", batch_size=batch_size) print(csv_val) pass_value = (400 * 0.7) print("pass value ", pass_value) - lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} if not csv_val: - print("csv file does not exist, station did not got ip, Test failed") - allure.attach(name="Csv Data", body="station did not got ip Test failed.") - assert False + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" else: - allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + allure.attach(name="Csv Data", body="Throughput value : " + str(list(csv_val["Down"].values())[-1])) if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test passed successfully") assert True else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") print("Test failed due to lesser value") - assert False - print("Test Completed... Cleaning up Stations") \ No newline at end of file + assert False, "Test failed due to lesser value" + print("Test Completed... Cleaning up Stations") diff --git a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_vlan_multi_sta_performance.py b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_vlan_multi_sta_performance.py index 8e5abe4aa..9ef3f895a 100644 --- a/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_vlan_multi_sta_performance.py +++ b/tests/e2e/advanced/multi_station_performance/wpa2_personal/test_vlan_multi_sta_performance.py @@ -1,10 +1,14 @@ +""" + Test Multi-Station Performance: Vlan Mode + pytest -m multistaperf +""" import pytest import allure import os import time import pandas as pd -#pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.vlan] +pytestmark = [pytest.mark.advance, pytest.mark.multistaperf, pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -14,83 +18,128 @@ setup_params_general = { {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100} ] }, - "rf": {}, + "rf": { + "5G":{ + "channel-width": 80}, + "2G":{ + "channel-width": 20} + }, "radius": False } + +@allure.feature("VLAN MODE MULTI-STATION PERFORMANCE") +@allure.parent_suite("MULTI STATION PERFORMANCE") +@allure.suite(suite_name="VLAN MODE") +@allure.sub_suite(sub_suite_name="WPA2_personal MULTI STATION PERFORMANCE") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaPerfVlan(object): + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5942", name="WIFI-5942") + @pytest.mark.vlan_msp @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_upload_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss1_2g + def test_multi_station_VLAN_udp_upload_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + batch_size = "3" + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (35 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") if sta_ip: assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5944", name="WIFI-5944") + @pytest.mark.vlan_msp @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_dis_nss1_2g + def test_multi_station_VLAN_udp_upload_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -99,59 +148,86 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (30 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB,48DdB(NSS-1) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5945", name="WIFI-5945") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_VLAN_udp_upload_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -159,278 +235,167 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6,9", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_38dB_48dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5946", name="WIFI-5946") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_download_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - atten_sr = lf_test.attenuator_serial() - atten_sr1 = atten_sr[1].split(".") - print(atten_sr1) - print(atten_sr) - sta = [] - for i in range(3): - sta.append(station_name + str(i)) - print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta) - if not sta_ip: - print("test failed due to no station ip") - assert False - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5947", name="WIFI-5947") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_download_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() - print(atten_sr) - atten_sr1 = atten_sr[1].split(".") - atten_sr2 = atten_sr[0].split(".") - print(atten_sr1, atten_sr2) - sta = [] - list_three_sta = [] - for i in range(6): - list_three_sta.append(station_name + str(i)) - if (i != 0) and (((i + 1) % 3) == 0): - sta.append(list_three_sta) - list_three_sta = [] - print(sta) - - for i in range(2): - radio_name = lf_tools.fiveg_radios[i] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta[i]) - if not sta_ip: - pass_condn = False - print("test failed due to no station ip") + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (25 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test failed due to lesser value") assert False - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) - time.sleep(0.5) - - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5948", name="WIFI-5948") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_download_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() - print(atten_sr) - atten_sr1 = atten_sr[1].split(".") - atten_sr2 = atten_sr[0].split(".") - print(atten_sr1, atten_sr2) - sta = [] - list_three_sta = [] - for i in range(9): - list_three_sta.append(station_name + str(i)) - if (i != 0) and (((i + 1) % 3) == 0): - sta.append(list_three_sta) - list_three_sta = [] - print(sta) - for i in range(3): - radio_name = lf_tools.fiveg_radios[i] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta[i]) - if not sta_ip: - pass_condn = False - print("test failed due to no station ip") - assert False - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) - time.sleep(0.5) - if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) - time.sleep(0.5) - - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_50dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6,9", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title( + "VLAN Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5949", name="WIFI-5949") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_download_10dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss1_2g + def test_multi_station_VLAN_udp_download_10dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + batch_size = "3" + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_dis_nss1_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (35 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 35 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5950", name="WIFI-5950") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_download_10dB_40dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_dis_nss1_2g + def test_multi_station_VLAN_udp_download_10dB_38dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -439,59 +404,87 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_dis_nss1_2g", mode=mode, vlan_id=vlan, + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_38dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], download_rate="1Gbps", batch_size="3,6", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (30 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 30 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB,48DdB(NSS-1) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6085", name="WIFI-6085") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss1_2g - def test_multi_station_VLAN_tcp_download_10dB_40dB_50dB_dis_nss1_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss1_2g + def test_multi_station_VLAN_udp_download_10dB_38dB_48dB_dis_nss1_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -499,108 +492,168 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_50dB_dis_nss1_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6,9", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_38dB_48dB_dis_nss1_2g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (25 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 25 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6092", name="WIFI-6092") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_upload_10dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss1_5g + def test_multi_station_VLAN_udp_upload_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + batch_size = "3" + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (250 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6093", name="WIFI-6093") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_dis_nss1_5g + def test_multi_station_VLAN_udp_upload_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -609,59 +662,89 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (250 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-download 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6094", name="WIFI-6094") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss1_5g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_50dB_dis_nss1_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_VLAN_udp_upload_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -669,108 +752,422 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 1) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_50dB_dis_nss1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6,9", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (200 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-1) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5946", name="WIFI-5946") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_dis_nss1_5g + def test_multi_station_VLAN_udp_download_10dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3" + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + atten_sr = get_test_library.attenuator_serial() + atten_sr1 = atten_sr[1].split(".") + print(atten_sr1) + print(atten_sr) + sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(3): + sta.append(station_name + str(i)) + print(sta) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (250 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") + + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB(NSS-1) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5947", name="WIFI-5947") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_25dB_dis_nss1_5g + def test_multi_station_VLAN_udp_download_10dB_25dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3,6" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() + print(atten_sr) + atten_sr1 = atten_sr[1].split(".") + atten_sr2 = atten_sr[0].split(".") + print(atten_sr1, atten_sr2) + sta = [] + list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(6): + list_three_sta.append(station_name + str(i)) + if (i != 0) and (((i + 1) % 3) == 0): + sta.append(list_three_sta) + list_three_sta = [] + print(sta) + + for i in range(2): + radio_name = get_test_library.wave2_5g_radios[i] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + time.sleep(0.5) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + for i in range(2): + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) + time.sleep(0.5) + + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_25dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (250 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 250 Mbpsps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") + + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB,35dB(NSS-1) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5948", name="WIFI-5948") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_25dB_35dB_dis_nss1_5g + def test_multi_station_VLAN_udp_download_10dB_25dB_35dB_dis_nss1_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3,6,9" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() + print(atten_sr) + atten_sr1 = atten_sr[1].split(".") + atten_sr2 = atten_sr[0].split(".") + print(atten_sr1, atten_sr2) + sta = [] + list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(9): + list_three_sta.append(station_name + str(i)) + if (i != 0) and (((i + 1) % 3) == 0): + sta.append(list_three_sta) + list_three_sta = [] + print(sta) + for i in range(3): + radio_name = get_test_library.wave2_5g_radios[i] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 1} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + time.sleep(0.5) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) + time.sleep(0.5) + if i >= 2: + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) + time.sleep(0.5) + + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_25dB_35dB_dis_nss1_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (200 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 200 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-1 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB ,35dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") + + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5951", name="WIFI-5951") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_upload_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss2_2g + def test_multi_station_VLAN_udp_upload_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + batch_size = "3" + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (70 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5966", name="WIFI-5966") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_dis_nss2_2g + def test_multi_station_VLAN_udp_upload_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -779,59 +1176,87 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (60 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-upload 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5954", name="WIFI-5954") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_VLAN_udp_upload_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -839,278 +1264,164 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_50dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6,9", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5971", name="WIFI-5971") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_download_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - atten_sr = lf_test.attenuator_serial() - atten_sr1 = atten_sr[1].split(".") - print(atten_sr1) - print(atten_sr) - sta = [] - for i in range(3): - sta.append(station_name + str(i)) - print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta) - if not sta_ip: - print("test failed due to no station ip") - assert False - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5970", name="WIFI-5970") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_download_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() - print(atten_sr) - atten_sr1 = atten_sr[1].split(".") - atten_sr2 = atten_sr[0].split(".") - print(atten_sr1, atten_sr2) - sta = [] - list_three_sta = [] - for i in range(6): - list_three_sta.append(station_name + str(i)) - if (i != 0) and (((i + 1) % 3) == 0): - sta.append(list_three_sta) - list_three_sta = [] - print(sta) - - for i in range(2): - radio_name = lf_tools.fiveg_radios[i] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta[i]) - if not sta_ip: - pass_condn = False - print("test failed due to no station ip") + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (50 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test failed due to lesser value") assert False - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) - time.sleep(0.5) - - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5972", name="WIFI-5972") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_download_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() - print(atten_sr) - atten_sr1 = atten_sr[1].split(".") - atten_sr2 = atten_sr[0].split(".") - print(atten_sr1, atten_sr2) - sta = [] - list_three_sta = [] - for i in range(9): - list_three_sta.append(station_name + str(i)) - if (i != 0) and (((i + 1) % 3) == 0): - sta.append(list_three_sta) - list_three_sta = [] - print(sta) - for i in range(3): - radio_name = lf_tools.fiveg_radios[i] - print(radio_name) - print(station_name) - values = radio_name.split(".") - shelf = int(values[0]) - resource = int(values[1]) - print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], - radio=radio_name, station_name=sta[i]) - if not sta_ip: - pass_condn = False - print("test failed due to no station ip") - assert False - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) - time.sleep(0.5) - for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) - time.sleep(0.5) - if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) - time.sleep(0.5) - - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6,9", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5969", name="WIFI-5969") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_download_10dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_dis_nss2_2g + def test_multi_station_VLAN_udp_download_10dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_twog[0] - radio_name = lf_tools.twog_radios[0] + batch_size = "3" + station_name = get_test_library.twog_prefix + radio_name = get_test_library.wave2_2g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (70 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 70 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter Distance (10dB)", name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5968", name="WIFI-5968") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_download_10dB_40dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_dis_nss2_2g + def test_multi_station_VLAN_udp_download_10dB_38dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -1119,59 +1430,87 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_38dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (60 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 60 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium Distance (10dB, 38dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,38dB,48dB(NSS-2) distance UDP-download 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5967", name="WIFI-5967") @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.tcp_download_10dB_40dB_50dB_dis_nss2_2g - def test_multi_station_VLAN_tcp_download_10dB_40dB_50dB_dis_nss2_2g(self, lf_test, lf_tools, station_names_twog): - lf_tools.reset_scenario() + @pytest.mark.udp_download_10dB_38dB_48dB_dis_nss2_2g + def test_multi_station_VLAN_udp_download_10dB_38dB_48dB_dis_nss2_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_twog[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.twog_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -1179,108 +1518,166 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.twog_radios[i] + radio_name = get_test_library.wave2_2g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_download_10dB_40dB_50dB_dis_nss2_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="3,6,9", - upload_rate="0Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_38dB_48dB_dis_nss2_2g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (50 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 38dB ,48dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 50 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (2G)", + value="Shorter & Medium & Long Distance (10dB, 38dB, 48dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5952", name="WIFI-5952") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_upload_10dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_dis_nss2_5g + def test_multi_station_VLAN_udp_upload_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - station_name = station_names_fiveg[0] - radio_name = lf_tools.fiveg_radios[0] + batch_size = "3" + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - atten_sr = lf_test.attenuator_serial() + atten_sr = get_test_library.attenuator_serial() atten_sr1 = atten_sr[1].split(".") print(atten_sr1) print(atten_sr) sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(3): sta.append(station_name + str(i)) print(sta) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta) if not sta_ip: print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_dis_nss2_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (500 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if sta_ip: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5953", name="WIFI-5953") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_dis_nss2_5g + def test_multi_station_VLAN_udp_upload_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(6): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -1289,59 +1686,87 @@ class TestMultiStaPerfVlan(object): print(sta) for i in range(2): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(2): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_25dB_dis_nss2_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (500 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,40dB,50dB(NSS-2) distance UDP-upload 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5973", name="WIFI-5973") @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.tcp_upload_10dB_40dB_50dB_dis_nss2_5g - def test_multi_station_VLAN_tcp_upload_10dB_40dB_50dB_dis_nss2_5g(self, lf_test, lf_tools, station_names_fiveg): - lf_tools.reset_scenario() + @pytest.mark.udp_upload_10dB_25dB_35dB_dis_nss2_5g + def test_multi_station_VLAN_udp_upload_10dB_40dB_50dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] mode = "VLAN" vlan = 100 - pass_condn = True - station_name = station_names_fiveg[0] - atten_sr = lf_test.attenuator_serial() + batch_size = "3,6,9" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() print(atten_sr) atten_sr1 = atten_sr[1].split(".") atten_sr2 = atten_sr[0].split(".") print(atten_sr1, atten_sr2) sta = [] list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) for i in range(9): list_three_sta.append(station_name + str(i)) if (i != 0) and (((i + 1) % 3) == 0): @@ -1349,40 +1774,323 @@ class TestMultiStaPerfVlan(object): list_three_sta = [] print(sta) for i in range(3): - radio_name = lf_tools.fiveg_radios[i] + radio_name = get_test_library.wave2_5g_radios[i] print(radio_name) print(station_name) values = radio_name.split(".") shelf = int(values[0]) resource = int(values[1]) print(shelf, resource) - lf_tools.set_radio_antenna("cli-json/set_wifi_radio", shelf, resource, values[2], 4) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) time.sleep(0.5) - sta_ip = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"], + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], radio=radio_name, station_name=sta[i]) if not sta_ip: - pass_condn = False print("test failed due to no station ip") - assert False + assert False, "test failed due to no station ip" time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr1[2]), i, 100) + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) time.sleep(0.5) for i in range(4): - lf_test.attenuator_modify(int(atten_sr2[2]), i, 400) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 400) time.sleep(0.5) if i >= 2: - lf_test.attenuator_modify(int(atten_sr2[2]), i, 500) + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 500) time.sleep(0.5) - wct_obj = lf_test.wifi_capacity(instance_name="tcp_VLAN_upload_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="3,6,9", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="120000", sort="linear") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_upload_10dB_40dB_50dB_dis_nss2_5g", mode=mode, vlan_id=[vlan], + download_rate="0Gbps", batch_size=batch_size, + upload_rate="1Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (400 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Up"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Up"].values())[-1])) + if list(csv_val["Up"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False print("Test Completed... Cleaning up Stations") - if pass_condn: - assert True + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB(NSS-2) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5971", name="WIFI-5971") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_dis_nss2_5g + def test_multi_station_VLAN_udp_download_10dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3" + station_name = get_test_library.fiveg_prefix + radio_name = get_test_library.wave2_5g_radios[0] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + atten_sr = get_test_library.attenuator_serial() + atten_sr1 = atten_sr[1].split(".") + print(atten_sr1) + print(atten_sr) + sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(3): + sta.append(station_name + str(i)) + print(sta) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_dis_nss2_5g", mode=mode, vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (500 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter Distance (10dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") + + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,25dB(NSS-2) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5970", name="WIFI-5970") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_25dB_dis_nss2_5g + def test_multi_station_VLAN_udp_download_10dB_25dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3,6" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() + print(atten_sr) + atten_sr1 = atten_sr[1].split(".") + atten_sr2 = atten_sr[0].split(".") + print(atten_sr1, atten_sr2) + sta = [] + list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(6): + list_three_sta.append(station_name + str(i)) + if (i != 0) and (((i + 1) % 3) == 0): + sta.append(list_three_sta) + list_three_sta = [] + print(sta) + + for i in range(2): + radio_name = get_test_library.wave2_5g_radios[i] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + time.sleep(0.5) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + for i in range(2): + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) + time.sleep(0.5) + + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_25dB_dis_nss2_5g", mode=mode, + vlan_id=[vlan], + download_rate="1Gbps", batch_size=batch_size, + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (500 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 500 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium Distance (10dB, 25dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") + + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Multi Station Performance Test with 10dB,40dB,50dB(NSS-2) distance UDP-download 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5972", name="WIFI-5972") + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.udp_download_10dB_40dB_50dB_dis_nss2_5g + def test_multi_station_VLAN_udp_download_10dB_40dB_50dB_dis_nss2_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): + get_test_library.chamber_view() + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + mode = "VLAN" + vlan = 100 + batch_size = "3,6,9" + station_name = get_test_library.fiveg_prefix + atten_sr = get_test_library.attenuator_serial() + print(atten_sr) + atten_sr1 = atten_sr[1].split(".") + atten_sr2 = atten_sr[0].split(".") + print(atten_sr1, atten_sr2) + sta = [] + list_three_sta = [] + get_test_library.add_vlan(vlan_ids=[vlan]) + for i in range(9): + list_three_sta.append(station_name + str(i)) + if (i != 0) and (((i + 1) % 3) == 0): + sta.append(list_three_sta) + list_three_sta = [] + print(sta) + for i in range(3): + radio_name = get_test_library.wave2_5g_radios[i] + print(radio_name) + print(station_name) + values = radio_name.split(".") + shelf = int(values[0]) + resource = int(values[1]) + print(shelf, resource) + data = {"shelf": shelf, "resource": resource, "radio": values[2], "antenna": 4} + get_test_library.json_post(_req_url="cli-json/set_wifi_radio", data=data) + time.sleep(0.5) + sta_ip = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=profile_data["security_key"], + radio=radio_name, station_name=sta[i]) + if not sta_ip: + print("test failed due to no station ip") + assert False, "test failed due to no station ip" + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr1[2]), i, 100) + time.sleep(0.5) + for i in range(4): + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 250) + time.sleep(0.5) + if i >= 2: + get_test_library.attenuator_modify(int(atten_sr2[2]), i, 350) + time.sleep(0.5) + + wct_obj = get_test_library.wifi_capacity(instance_name="udp_VLAN_download_10dB_40dB_50dB_dis_nss2_5g", mode=mode, + vlan_id=[vlan], + download_rate="1Gbps", batch_size="3,6,9", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="120000", sort="linear",create_vlan=False) + + report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + + get_test_library.attach_report_graphs(report_name=report_name) + csv_val = get_test_library.read_csv_individual_station_throughput(dir_name=report_name, option=None, + individual_station_throughput=False, kpi_csv=True, + file_name="/kpi.csv", batch_size=batch_size) + print(csv_val) + pass_value = (400 * 0.7) + print("pass value ", pass_value) + get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True) + table_data = {"Attenuation (dB)": "10dB, 25dB ,35dB", + "Expected Throughput (Mbps)": str(pass_value) + " (70% of 400 Mbps)", + "Actual Throughput (Mbps)": str(list(csv_val["Down"].values())[-1])} + if not csv_val: + print("csv file does not exist, Test failed") + allure.attach(name="Csv Data", body="csv file does not exist, Test failed") + assert False, "csv file does not exist, Test failed" + else: + allure.attach(name="Csv Data", body=str(list(csv_val["Down"].values())[-1])) + if list(csv_val["Down"].values())[-1] >= pass_value: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") + print("Test passed successfully") + assert True + else: + get_test_library.allure_report_table_format(dict_data=table_data, key="NSS-2 (5G)", + value="Shorter & Medium & Long Distance (10dB, 25dB, 35dB)", + name="Test_results") + print("Test failed due to lesser value") + assert False + print("Test Completed... Cleaning up Stations") diff --git a/tests/e2e/advanced/rate_vs_orientation/wpa2_personal/test_bridge_orientation.py b/tests/e2e/advanced/rate_vs_orientation/wpa2_personal/test_bridge_orientation.py index 6211cc7ba..4ba10abc2 100644 --- a/tests/e2e/advanced/rate_vs_orientation/wpa2_personal/test_bridge_orientation.py +++ b/tests/e2e/advanced/rate_vs_orientation/wpa2_personal/test_bridge_orientation.py @@ -20,12 +20,12 @@ setup_params_general = { } @allure.feature("BRIDGE MODE RATE VS ORIENTATION") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRatevsOrientationBridge(object): diff --git a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_bridge_mode.py b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_bridge_mode.py index a676cd683..de7700e65 100644 --- a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_bridge_mode.py @@ -29,12 +29,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz20 class TestRatevsRangeBridge(object): diff --git a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py index e350679a8..848c88d82 100644 --- a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py @@ -32,12 +32,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRatevsRangeNat(object): @pytest.mark.wpa2_personal diff --git a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py index 3313075b9..6f00d2637 100644 --- a/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py @@ -36,19 +36,19 @@ # # @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") # @pytest.mark.parametrize( -# 'setup_profiles', +# 'setup_configuration', # [setup_params_general], # indirect=True, # scope="class" # ) -# @pytest.mark.usefixtures("setup_profiles") +# @pytest.mark.usefixtures("setup_configuration") # @pytest.mark.Mhz20 # class TestRatevsRangeVlan(object): # # @pytest.mark.wpa2_personal # @pytest.mark.twog # @pytest.mark.client11b -# def test_client_wpa2_personal_2g_11b(self, get_vif_state, +# def test_client_wpa2_personal_2g_11b(self, # lf_test, station_names_twog, create_lanforge_chamberview_dut, # get_configuration, lf_tools): # """ @@ -101,7 +101,7 @@ # @pytest.mark.wpa2_personal # @pytest.mark.twog # @pytest.mark.client11g -# def test_client_wpa2_personal_2g_11g(self, get_vif_state, +# def test_client_wpa2_personal_2g_11g(self, # lf_test, station_names_twog, create_lanforge_chamberview_dut, # get_configuration, lf_tools): # """ @@ -155,7 +155,7 @@ # @pytest.mark.wpa2_personal # @pytest.mark.fiveg # @pytest.mark.client11a -# def test_client_wpa2_personal_5g_11a(self, get_vif_state, +# def test_client_wpa2_personal_5g_11a(self, # lf_test, station_names_fiveg, create_lanforge_chamberview_dut, # get_configuration, lf_tools): # """ @@ -208,7 +208,7 @@ # @pytest.mark.wpa2_personal # @pytest.mark.fiveg # @pytest.mark.client11an -# def test_client_wpa2_personal_5g_11an(self, get_vif_state, +# def test_client_wpa2_personal_5g_11an(self, # lf_test, station_names_fiveg, create_lanforge_chamberview_dut, # get_configuration,lf_tools): # """ @@ -262,7 +262,7 @@ # @pytest.mark.wpa2_personal # @pytest.mark.fiveg # @pytest.mark.client11ac -# def test_client_wpa2_personal_5g_11ac(self, get_vif_state, +# def test_client_wpa2_personal_5g_11ac(self, # lf_test, station_names_fiveg, create_lanforge_chamberview_dut, # get_configuration, lf_tools): # """ diff --git a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_2g.py b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_2g.py index 460881c4d..c33ababb6 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_2g.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_2g.py @@ -1,2162 +1,160 @@ """ Performance Test: Receiver Sensitivity Test: bridge Mode - pytest -m "rx_sensitivity_test and bridge" + pytest -m "rx_sensitivity_tests and wpa2_personal and bridge" """ import os import pytest import allure -pytestmark = [pytest.mark.rx_sensitivity_test, pytest.mark.bridge, - pytest.mark.usefixtures("setup_test_run")] +pytestmark = [pytest.mark.rx_sensitivity_tests, pytest.mark.bridge, pytest.mark.wpa2_personal] 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": { - "is5GHz": {"channelBandwidth": "is20MHz"}, - "is5GHzL": {"channelBandwidth": "is20MHz"}, - "is5GHzU": {"channelBandwidth": "is20MHz"}}, + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "2G": {"channel-width": 20}, + "5G": {"channel-width": 80}, + }, "radius": False, - - "attenuator": { - "attenuator": "1.1.3059", - "attenuator2": "1.1.3034"} - } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.parent_suite("Receiver Sensitivity Tests") +@allure.suite("WPA2 Personal Security") +@allure.sub_suite("Bridge Mode") +@allure.feature("TR-398 Issue 2") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityBRIDGE2G(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") - @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.mcs0 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs0_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for Receiver Sensitivity for 2.4G band") + def test_client_wpa2_personal_bridge_2g(self, get_test_library, setup_configuration, check_connectivity): """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" + pytest -m "rx_sensitivity_tests and bridge and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + vlan = 1 + dut_name = list(setup_configuration.keys())[0] + dut_5g, dut_2g = "", "" + radios_2g, radios_5g, radios_ax = [], [], [] + data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode") + data = data['interfaces'] + port, port_data = "", [] + for i in data: + for j in i: + if i[j]['mode'] != '': + port_data.append(i) + + for item in range(len(port_data)): + for p in port_data[item]: + temp = port_data[item][p]['port'].split('.') + temp = list(map(int, temp)) + temp = list(map(str, temp)) + port = ".".join(temp) + if port_data[item][p]['mode'] == '802.11bgn-AC': + radios_2g.append(port + " " + port_data[item][p]['alias']) + if port_data[item][p]['mode'] == '802.11an-AC': + radios_5g.append(port + " " + port_data[item][p]['alias']) + if port_data[item][p]['mode'] == '802.11abgn-AX': + radios_ax.append(port + " " + port_data[item][p]['alias']) + for i in setup_configuration[dut_name]['ssid_data']: + get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values()) + dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \ + '' + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i+1})' \ + f'' if get_test_library.dut_idx_mapping[str(i)][3] == "5G" else "NA" + + dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \ + '' + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i+1})' \ + f'' if get_test_library.dut_idx_mapping[str(i)][3] == "2G" else "NA" + + instance_name = "rx_sens_TR398" + result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,dut_name=dut_name, + dut_5g=dut_5g, dut_2g=dut_2g, mode=mode, vlan_id=vlan, skip_2g=False, + skip_5g=True, instance_name=instance_name, test="rxsens", ssid_name=ssid_name, + security_key=security_key, security=security, + move_to_influx=False, dut_data=setup_configuration) + + if result: + assert True + else: + assert False, description + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") + @pytest.mark.fiveg + @allure.title("Test for Receiver Sensitivity for 5G band") + def test_client_wpa2_personal_bridge_5g(self, get_test_library, setup_configuration, check_connectivity): + """Receiver Sensitivity Bridge Mode + pytest -m "rx_sensitivity_tests and bridge and wpa2_personal and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] mode = "BRIDGE" band = "twog" vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 0 CCK, OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], - ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) + dut_name = list(setup_configuration.keys())[0] + dut_5g, dut_2g = "", "" + radios_2g, radios_5g, radios_ax = [], [], [] + data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode") + data = data['interfaces'] + port, port_data = "", [] + for i in data: + for j in i: + if i[j]['mode'] != '': + port_data.append(i) - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS0_NSS0", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station + for item in range(len(port_data)): + for p in port_data[item]: + temp = port_data[item][p]['port'].split('.') + temp = list(map(int, temp)) + temp = list(map(str, temp)) + port = ".".join(temp) + if port_data[item][p]['mode'] == '802.11bgn-AC': + radios_2g.append(port + " " + port_data[item][p]['alias']) + if port_data[item][p]['mode'] == '802.11an-AC': + radios_5g.append(port + " " + port_data[item][p]['alias']) + if port_data[item][p]['mode'] == '802.11abgn-AX': + radios_ax.append(port + " " + port_data[item][p]['alias']) + for i in setup_configuration[dut_name]['ssid_data']: + get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values()) + dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \ + '' + \ + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i + 1})' \ + f'' if get_test_library.dut_idx_mapping[str(i)][ + 3] == "5G" else "NA" + + dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \ + '' + \ + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i + 1})' \ + f'' if get_test_library.dut_idx_mapping[str(i)][ + 3] == "2G" else "NA" + + instance_name = "rx_sens_TR398" + result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, + dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode, + vlan_id=vlan, skip_2g=True, skip_5g=False, instance_name=instance_name, + test="rxsens", ssid_name=ssid_name, security_key=security_key, + security=security, move_to_influx=False, dut_data=setup_configuration) + + if result: + assert True else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2447", name="WIFI-2447") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs1 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs1_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 1 CCK, OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS1_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2448", name="WIFI-2448") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs2 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs2_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 2 CCK, OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS2_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2449", name="WIFI-2449") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs3 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs3_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 3 CCK, OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS3_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2450", name="WIFI-2450") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs4 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs4_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 4 OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS4_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2451", name="WIFI-2451") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs5 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs5_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 5 OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS5_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2452", name="WIFI-2452") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs6 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs6_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 6 OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS6_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2453", name="WIFI-2453") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs7 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs7_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 7 OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS7_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2454", name="WIFI-2454") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs8 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs8_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 8 VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS8_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2455", name="WIFI-2455") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs9 - @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs9_nss1_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 9 VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS9_NSS1", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - # Test case for mcs0-9,Nss 2, bw 20MHz - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2458", name="WIFI-2458") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs0 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs0_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 0 CCK, OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS0_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2459", name="WIFI-2459") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs1 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs1_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 1 CCK, OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS1_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2460", name="WIFI-2460") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs2 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs2_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 2 CCK, OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS2_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2461", name="WIFI-2461") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs3 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs3_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 3 CCK, OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS3_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2462", name="WIFI-2462") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs4 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs4_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 4 OFDM, HT, VHT'], - ['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS4_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2463", name="WIFI-2463") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs5 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs5_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 5 OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS5_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2464", name="WIFI-2464") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs6 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs6_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 6 CCK, OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS6_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2465", name="WIFI-2465") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs7 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs7_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 7 OFDM, HT, VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS7_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2466", name="WIFI-2466") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs8 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs8_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 8 VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS8_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2467", name="WIFI-2467") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs9 - @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs9_nss2_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 9 VHT'], - ['spatial_streams: 2'], ['bandw_options: 20'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS9_NSS2", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - # Test case for mcs0-9,Nss 3, bw 20MHz - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2470", name="WIFI-2470") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs0 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs0_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 0 CCK, OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS0_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2471", name="WIFI-2471") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs1 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs1_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 1 CCK, OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS1_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2472", name="WIFI-2472") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs2 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs2_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 2 CCK, OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS2_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2473", name="WIFI-2473") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs3 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs3_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 3 CCK, OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS3_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2474", name="WIFI-2474") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs4 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs4_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 4 OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS4_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2475", name="WIFI-2475") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs5 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs5_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 5 OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS5_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2476", name="WIFI-2476") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs6 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs6_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 6 OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS6_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2477", name="WIFI-2477") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs7 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs7_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 7 OFDM, HT, VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS7_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2478", name="WIFI-2478") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs8 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs8_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 8 VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS8_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2479", name="WIFI-2479") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs9 - @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs9_nss3_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 9 VHT'], - ['spatial_streams: 3'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS9_NSS3", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - # Test case for mcs0-9,Nss 4, bw 20MHz - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2482", name="WIFI-2482") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs0 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs0_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 0 CCK, OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS0_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2483", name="WIFI-2483") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs1 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs1_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 1 CCK, OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS1_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2484", name="WIFI-2484") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs2 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs2_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 2 CCK, OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS2_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2485", name="WIFI-2485") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs3 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs3_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 3 CCK, OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS3_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2486", name="WIFI-2486") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs4 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs4_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 4 OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS4_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2487", name="WIFI-2487") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs5 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs5_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 5 OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS5_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2488", name="WIFI-2488") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs6 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs6_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 6 OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS6_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2489", name="WIFI-2489") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs7 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs7_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 7 OFDM, HT, VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS7_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2490", name="WIFI-2490") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs8 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs8_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 8 VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS8_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2491", name="WIFI-2491") - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.mcs9 - @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs9_nss4_2g(self, get_vif_state, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Receiver Sensitivity Bridge Mode - pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - attenuator = setup_params_general["attenuator"]["attenuator"] - attenuator2 = setup_params_general["attenuator"]["attenuator2"] - mode = "BRIDGE" - band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - raw_lines = [['txo_preamble: VHT'], - ['txo_mcs: 9 VHT'], - ['spatial_streams: 4'], ['bandw_options: 80'], ['txo_sgi: ON'], - ['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2], ["show_3s: 1"], ['txo_txpower: 17'], - ["show_ll_graphs: 1"], ["show_log: 1"]] - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - - if station: - dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode, - instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_MCS9_NSS4", - vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - entries = os.listdir("../reports/" + report_name + '/') - pdf = False - for i in entries: - if ".pdf" in i: - pdf = i - if pdf: - allure.attach.file(source="../reports/" + report_name + "/" + pdf, - name=get_configuration["access_point"][0]["model"] + "_dataplane") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False + assert False, description \ No newline at end of file diff --git a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_5g.py b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_5g.py index ae1bb7cbd..e66950d29 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_5g.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_5g.py @@ -33,19 +33,19 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityBRIDGE5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs0_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs0_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -98,7 +98,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs1_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs1_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -151,7 +151,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs2_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs2_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -204,7 +204,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs3_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs3_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -256,7 +256,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs4_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs4_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -309,7 +309,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs5_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs5_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -361,7 +361,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs6_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs6_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -414,7 +414,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs7_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs7_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -466,7 +466,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs8_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs8_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -519,7 +519,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss1 - def test_client_wpa2_personal_bridge_mcs9_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs9_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -572,7 +572,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs0_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs0_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -625,7 +625,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs1_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs1_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -678,7 +678,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs2_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs2_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -731,7 +731,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs3_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs3_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -784,7 +784,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs4_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs4_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -837,7 +837,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs5_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs5_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -890,7 +890,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs6_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs6_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -943,7 +943,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs7_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs7_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -996,7 +996,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs8_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs8_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1049,7 +1049,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss2 - def test_client_wpa2_personal_bridge_mcs9_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs9_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1103,7 +1103,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs0_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs0_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1156,7 +1156,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs1_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs1_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1209,7 +1209,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs2_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs2_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1262,7 +1262,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs3_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs3_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1315,7 +1315,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs4_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs4_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1368,7 +1368,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs5_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs5_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1421,7 +1421,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs6_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs6_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1474,7 +1474,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs7_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs7_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1527,7 +1527,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs8_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs8_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1580,7 +1580,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss3 - def test_client_wpa2_personal_bridge_mcs9_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs9_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1635,7 +1635,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs0_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs0_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1688,7 +1688,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs1_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs1_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1741,7 +1741,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs2_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs2_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1794,7 +1794,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs3_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs3_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1847,7 +1847,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs4_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs4_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1900,7 +1900,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs5_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs5_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -1953,7 +1953,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs6_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs6_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -2006,7 +2006,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs7_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs7_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -2059,7 +2059,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs8_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs8_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -2112,7 +2112,7 @@ class TestRxSensitivityBRIDGE5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss4 - def test_client_wpa2_personal_bridge_mcs9_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_mcs9_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_all_mcs.py b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_all_mcs.py index 187d6c2a6..f110a8916 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_all_mcs.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_bridge_mode_all_mcs.py @@ -33,18 +33,18 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityBRIDGEAllMcs5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.all_mcs - def test_client_wpa2_personal_bridge_all_mcs_5g(self, get_vif_state, + def test_client_wpa2_personal_bridge_all_mcs_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode @@ -97,7 +97,7 @@ class TestRxSensitivityBRIDGEAllMcs5G(object): @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.all_mcs - def test_client_wpa2_personal_bridge_all_mcs_2g(self, get_vif_state, + def test_client_wpa2_personal_bridge_all_mcs_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity Bridge Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_bridge_rxsensitivity.py b/tests/e2e/advanced/receiver_sensitivity/test_bridge_rxsensitivity.py index 4b9a0698d..d8919e298 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_bridge_rxsensitivity.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_bridge_rxsensitivity.py @@ -24,12 +24,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE RECEIVER SENSITIVITY TEST") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityBridge(object): diff --git a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode.py b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode.py index 2db85744b..3736de61d 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode.py @@ -33,19 +33,19 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityNAT5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs0_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -98,7 +98,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs1_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -151,7 +151,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs2_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -204,7 +204,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs3_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -256,7 +256,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs4_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -309,7 +309,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs5_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -361,7 +361,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs6_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -414,7 +414,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs7_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -466,7 +466,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs8_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -519,7 +519,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs9_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -572,7 +572,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs0_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -625,7 +625,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs1_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -678,7 +678,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs2_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -731,7 +731,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs3_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -784,7 +784,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs4_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -837,7 +837,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs5_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -890,7 +890,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs6_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -943,7 +943,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs7_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -996,7 +996,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs8_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1049,7 +1049,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs9_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1103,7 +1103,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs0_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1156,7 +1156,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs1_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1209,7 +1209,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs2_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1262,7 +1262,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs3_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1315,7 +1315,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs4_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1368,7 +1368,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs5_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1421,7 +1421,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs6_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1474,7 +1474,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs7_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1527,7 +1527,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs8_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1580,7 +1580,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs9_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1634,7 +1634,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs0_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1687,7 +1687,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs1_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1740,7 +1740,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs2_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1793,7 +1793,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs3_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1846,7 +1846,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs4_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1899,7 +1899,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs5_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1952,7 +1952,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs6_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2005,7 +2005,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs7_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2058,7 +2058,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs8_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2111,7 +2111,7 @@ class TestRxSensitivityNAT5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs9_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_2g.py b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_2g.py index e7b89f9b1..c562158bb 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_2g.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_2g.py @@ -33,19 +33,19 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityNAT2G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs0_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -98,7 +98,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs1_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -151,7 +151,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs2_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -204,7 +204,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs3_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -256,7 +256,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs4_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -309,7 +309,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs5_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -361,7 +361,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs6_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -414,7 +414,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs7_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -466,7 +466,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs8_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -519,7 +519,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss1 - def test_client_wpa2_personal_mcs9_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss1_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -572,7 +572,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs0_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -625,7 +625,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs1_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -678,7 +678,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs2_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -731,7 +731,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs3_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -784,7 +784,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs4_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -837,7 +837,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs5_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -890,7 +890,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs6_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -943,7 +943,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs7_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -996,7 +996,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs8_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1049,7 +1049,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss2 - def test_client_wpa2_personal_mcs9_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss2_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1103,7 +1103,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs0_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1156,7 +1156,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs1_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1209,7 +1209,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs2_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1262,7 +1262,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs3_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1315,7 +1315,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs4_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1368,7 +1368,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs5_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1421,7 +1421,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs6_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1474,7 +1474,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs7_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1527,7 +1527,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs8_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1580,7 +1580,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss3 - def test_client_wpa2_personal_mcs9_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss3_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1634,7 +1634,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs0_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs0_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1687,7 +1687,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs1_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs1_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1740,7 +1740,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs2_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs2_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1793,7 +1793,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs3_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs3_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1846,7 +1846,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs4_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs4_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1899,7 +1899,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs5_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs5_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -1952,7 +1952,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs6_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs6_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2005,7 +2005,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs7_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs7_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2058,7 +2058,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs8_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs8_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -2111,7 +2111,7 @@ class TestRxSensitivityNAT2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss4 - def test_client_wpa2_personal_mcs9_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_mcs9_nss4_5g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_all_mcs.py b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_all_mcs.py index b9b9e6118..2184dd48e 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_all_mcs.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_nat_mode_all_mcs.py @@ -33,18 +33,18 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityNATAllMcs5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.all_mcs - def test_client_wpa2_personal_nat_all_mcs_5g(self, get_vif_state, + def test_client_wpa2_personal_nat_all_mcs_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode @@ -97,7 +97,7 @@ class TestRxSensitivityNATAllMcs5G(object): @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.all_mcs - def test_client_wpa2_personal_nat_all_mcs_2g(self, get_vif_state, + def test_client_wpa2_personal_nat_all_mcs_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity nat Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_2g.py b/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_2g.py index 6926b7967..79f450850 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_2g.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_2g.py @@ -33,19 +33,19 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityVLAN2G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs0_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -98,7 +98,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs1_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -151,7 +151,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs2_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -204,7 +204,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs3_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -256,7 +256,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs4_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -309,7 +309,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs5_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -361,7 +361,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs6_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -414,7 +414,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs7_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -466,7 +466,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs8_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -519,7 +519,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs9_nss1_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss1_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -573,7 +573,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs0_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -626,7 +626,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs1_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -679,7 +679,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs2_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -732,7 +732,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs3_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -785,7 +785,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs4_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -838,7 +838,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs5_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -891,7 +891,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs6_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -944,7 +944,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs7_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -997,7 +997,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs8_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1050,7 +1050,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs9_nss2_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss2_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1104,7 +1104,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs0_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1157,7 +1157,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs1_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1210,7 +1210,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs2_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1263,7 +1263,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs3_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1316,7 +1316,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs4_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1369,7 +1369,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs5_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1422,7 +1422,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs6_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1475,7 +1475,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs7_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1528,7 +1528,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs8_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1581,7 +1581,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs9_nss3_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss3_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1635,7 +1635,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs0 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs0_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1688,7 +1688,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs1 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs1_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1741,7 +1741,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs2 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs2_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1794,7 +1794,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs3 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs3_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1847,7 +1847,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs4 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs4_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1900,7 +1900,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs5 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs5_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1953,7 +1953,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs6 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs6_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2006,7 +2006,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs7 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs7_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2059,7 +2059,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs8 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs8_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2112,7 +2112,7 @@ class TestRxSensitivityVLAN2G(object): @pytest.mark.twog @pytest.mark.mcs9 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs9_nss4_2g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss4_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode diff --git a/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_5g.py b/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_5g.py index 3fd5b590e..9f3168b21 100644 --- a/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_5g.py +++ b/tests/e2e/advanced/receiver_sensitivity/test_vlan_mode_5g.py @@ -33,19 +33,19 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRxSensitivityVLAN5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs0_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -98,7 +98,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs1_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -151,7 +151,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs2_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -204,7 +204,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs3_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -256,7 +256,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs4_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -309,7 +309,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs5_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -361,7 +361,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs6_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -414,7 +414,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs7_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -466,7 +466,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs8_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -519,7 +519,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss1 - def test_client_wpa2_personal_vlan_mcs9_nss1_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss1_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -572,7 +572,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs0_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -625,7 +625,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs1_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -678,7 +678,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs2_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -731,7 +731,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs3_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -784,7 +784,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs4_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -837,7 +837,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs5_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -890,7 +890,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs6_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -943,7 +943,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs7_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -996,7 +996,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs8_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1049,7 +1049,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss2 - def test_client_wpa2_personal_vlan_mcs9_nss2_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss2_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1103,7 +1103,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs0_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1156,7 +1156,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs1_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1209,7 +1209,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs2_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1262,7 +1262,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs3_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1315,7 +1315,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs4_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1368,7 +1368,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs5_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1421,7 +1421,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs6_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1474,7 +1474,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs7_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1527,7 +1527,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs8_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1580,7 +1580,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss3 - def test_client_wpa2_personal_vlan_mcs9_nss3_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss3_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1634,7 +1634,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs0 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs0_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs0_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1687,7 +1687,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs1 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs1_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs1_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1740,7 +1740,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs2 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs2_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs2_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1793,7 +1793,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs3 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs3_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs3_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1846,7 +1846,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs4 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs4_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs4_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1899,7 +1899,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs5 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs5_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs5_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -1952,7 +1952,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs6 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs6_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs6_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2005,7 +2005,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs7 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs7_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs7_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2058,7 +2058,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs8 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs8_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs8_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode @@ -2111,7 +2111,7 @@ class TestRxSensitivityVLAN5G(object): @pytest.mark.fiveg @pytest.mark.mcs9 @pytest.mark.nss4 - def test_client_wpa2_personal_vlan_mcs9_nss4_5g(self, get_vif_state, + def test_client_wpa2_personal_vlan_mcs9_nss4_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): """Receiver Sensitivity vlan Mode diff --git a/tests/e2e/advanced/roam_test/hard_roam/OTA/test_roam_ota.py b/tests/e2e/advanced/roam_test/hard_roam/OTA/test_roam_ota.py index 863c8972f..7db32ac1c 100644 --- a/tests/e2e/advanced/roam_test/hard_roam/OTA/test_roam_ota.py +++ b/tests/e2e/advanced/roam_test/hard_roam/OTA/test_roam_ota.py @@ -23,12 +23,12 @@ setup_params_general = { @allure.suite("Hard Roam over the air") @allure.feature("Roam Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRoamOTA(object): @@ -245,12 +245,12 @@ class TestRoamOTA(object): # @allure.suite("Hard Roam over the air") # @allure.feature("Roam Test") # @pytest.mark.parametrize( -# 'setup_profiles', +# 'setup_configuration', # [setup_params_general_two], # indirect=True, # scope="class" # ) -# @pytest.mark.usefixtures("setup_profiles") +# @pytest.mark.usefixtures("setup_configuration") # class TestRoamOTAdot1xSha256(object): # # @pytest.mark.hard_roam_6g_to_6g_dot1x_sha256 diff --git a/tests/e2e/advanced/roam_test/hard_roam/OTD/test_5g_roam_otd.py b/tests/e2e/advanced/roam_test/hard_roam/OTD/test_5g_roam_otd.py index 7cdf4110a..74e38f9a5 100644 --- a/tests/e2e/advanced/roam_test/hard_roam/OTD/test_5g_roam_otd.py +++ b/tests/e2e/advanced/roam_test/hard_roam/OTD/test_5g_roam_otd.py @@ -1,76 +1,76 @@ -import pytest -import allure -import time - -pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] - -setup_params_general = { - "mode": "BRIDGE", - "roam": True, - "ft+psk": True, - "ft-otd": False, - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "RoamAP2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "RoamAP5g", "appliedRadios": ["5G"], "security_key": "something"}], - - "wpa3_personal": [{"ssid_name": "RoamAP6g", "appliedRadios": ["6G"], "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -@allure.suite("Hard Roam 5g") -@allure.feature("Roam Test") -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") - - -class TestRoamOTDFiveg(object): - - @pytest.mark.roam_5g_otd - @pytest.mark.wpa2_personal - def test_multi_hard_roam_otd_5g_to_5g(self, get_configuration, lf_test, lf_reports, lf_tools, - run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs, - roaming_delay, iteration, client): - profile_data = setup_params_general["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 - # check channel - - lf_test.create_n_clients(sta_prefix="wlan1", num_sta=1, dut_ssid=ssid_name, - dut_security=security, dut_passwd=security_key, band="fiveg", - lf_tools=lf_tools, type="11r") - sta_list = lf_tools.get_station_list() - print(sta_list) - val = lf_test.wait_for_ip(station=sta_list) - ch = "" - if val: - for sta_name in sta_list: - sta = sta_name.split(".")[2] - time.sleep(5) - ch = lf_tools.station_data_query(station_name=str(sta), query="channel") - print(ch) - lf_test.Client_disconnect(station_name=sta_list) - - else: - pytest.exit("station failed to get ip") - assert False - - lf_test.multi_hard_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, - lf_reports=lf_reports, - instantiate_profile=instantiate_profile, - ssid_name=ssid_name, security=security, security_key=security_key, - band=band, test="5g", - iteration=int(iteration), num_sta=int(client), roaming_delay=roaming_delay, - option="otds", channel=ch) - - +# import pytest +# import allure +# import time +# +# pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] +# +# setup_params_general = { +# "mode": "BRIDGE", +# "roam": True, +# "ft+psk": True, +# "ft-otd": False, +# "ssid_modes": { +# "wpa2_personal": [{"ssid_name": "RoamAP2g", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "RoamAP5g", "appliedRadios": ["5G"], "security_key": "something"}], +# +# "wpa3_personal": [{"ssid_name": "RoamAP6g", "appliedRadios": ["6G"], "security_key": "something"}] +# }, +# "rf": {}, +# "radius": False +# } +# @allure.suite("Hard Roam 5g") +# @allure.feature("Roam Test") +# # @pytest.mark.parametrize( +# # 'setup_configuration', +# # [setup_params_general], +# # indirect=True, +# # scope="class" +# # ) +# # @pytest.mark.usefixtures("setup_configuration") +# +# +# class TestRoamOTDFiveg(object): +# +# @pytest.mark.roam_5g_otd +# @pytest.mark.wpa2_personal +# def test_multi_hard_roam_otd_5g_to_5g(self, lf_test, lf_reports, lf_tools, +# run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs, +# roaming_delay, iteration, client): +# profile_data = setup_params_general["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 +# # check channel +# +# # lf_test.create_n_clients(sta_prefix="wlan1", num_sta=1, dut_ssid=ssid_name, +# # dut_security=security, dut_passwd=security_key, band="fiveg", +# # lf_tools=lf_tools, type="11r") +# # sta_list = lf_tools.get_station_list() +# # print(sta_list) +# # val = lf_test.wait_for_ip(station=sta_list) +# # ch = "" +# # if val: +# # for sta_name in sta_list: +# # sta = sta_name.split(".")[2] +# # time.sleep(5) +# # ch = lf_tools.station_data_query(station_name=str(sta), query="channel") +# # print(ch) +# # lf_test.Client_disconnect(station_name=sta_list) +# # +# # else: +# # pytest.exit("station failed to get ip") +# # assert False +# # +# # lf_test.multi_hard_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, +# # lf_reports=lf_reports, +# # instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # band=band, test="5g", +# # iteration=int(iteration), num_sta=int(client), roaming_delay=roaming_delay, +# # option="otds", channel=ch) +# +# diff --git a/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_5g_to_5g.py b/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_5g_to_5g.py index 7c7711839..d7bade80a 100644 --- a/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_5g_to_5g.py +++ b/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_5g_to_5g.py @@ -1,170 +1,170 @@ -import time - -import pytest -import allure -# from configuration import CONFIGURATION - -pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] - +# import time +# +# import pytest +# import allure +# # from configuration import CONFIGURATION +# +# pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] +# +# # setup_params_general = { +# # "mode": "BRIDGE", +# # "roam": False, +# # "ssid_modes": { +# # "wpa2_personal": [ +# # {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, +# # {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, +# # "rf": {}, +# # "radius": False +# # } # setup_params_general = { # "mode": "BRIDGE", -# "roam": False, +# "roam": True, +# "ft+psk": True, # "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, +# "wpa2_personal": [{"ssid_name": "RoamAP2g", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "RoamAP5g", "appliedRadios": ["5G"], "security_key": "something"}], +# +# "wpa3_personal": [{"ssid_name": "RoamAP6g", "appliedRadios": ["6G"], "security_key": "something"}] +# }, +# # "roam_type": "fiveg_to_fiveg", # "rf": {}, # "radius": False # } -setup_params_general = { - "mode": "BRIDGE", - "roam": True, - "ft+psk": True, - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "RoamAP2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "RoamAP5g", "appliedRadios": ["5G"], "security_key": "something"}], - - "wpa3_personal": [{"ssid_name": "RoamAP6g", "appliedRadios": ["6G"], "security_key": "something"}] - }, - # "roam_type": "fiveg_to_fiveg", - "rf": {}, - "radius": False -} -@allure.suite("Roam Test with attenuator") -@allure.feature("Roam Test") -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# @allure.step -# def nested_step_allure(bssid, rssi): -# pass - -class TestBasicRoam(object): - - @pytest.mark.roam_5g - @pytest.mark.bob - @pytest.mark.wpa2_personal - def test_basic_roam_5g_to_5g(self, get_configuration, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "fiveg" - vlan = 1 - lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, - lf_reports=lf_reports, - instantiate_profile=instantiate_profile, - ssid_name=ssid_name, security=security, security_key=security_key, - mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") - - - @pytest.mark.multi_roam - @pytest.mark.wpa2_personal - @pytest.mark.wpa3_personal - def test_multi_roam_5g_to_5g_soft_roam_11r(self, get_configuration, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - profile_data = setup_params_general["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 - print("starting snifer") - # lf_test.start_sniffer(radio_channel=36, radio="wiphy2", test_name="roam_11r", duration=3600) - lf_test.create_n_clients(sta_prefix="wlan", num_sta=2, dut_ssid=ssid_name, - dut_security=security, dut_passwd=security_key, radio="wiphy1", lf_tools=lf_tools, - type="11r") - - # lf_test.multi_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, - # lf_reports=lf_reports, - # instantiate_profile=instantiate_profile, - # ssid_name=ssid_name, security=security, security_key=security_key, - # mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") - # - # print("stop sniff") - # file_name = lf_test.stop_sniffer() - # print(file_name) - # print("wait for logs to be attached") - # file_name = "roam_11r2022-03-23-00-02.pcap" - # time.sleep(10) - # query_auth = lf_test. query_sniff_data(pcap_file=str(file_name), filter="wlan.fc.type_subtype==0x000b") - # print("query", query_auth) - # allure.attach(name="authentication", body=str(query_auth)) - # query_asso = lf_test.query_sniff_data(pcap_file=str(file_name), filter="wlan.fc.type_subtype==0x0000") - # print("query", query_asso) - # allure.attach(name="authentication", body=str(query_asso)) - # query_reasso_response = lf_test.query_sniff_data(pcap_file=str(file_name), filter="(wlan.fc.type_subtype==3) && (wlan.tag.number==55)") - # print("query", query_reasso_response) - # allure.attach(name="authentication", body=str(query_reasso_response)) - # query_4way = lf_test.query_sniff_data(pcap_file=str(file_name), filter="eapol") - # print("query", query_4way) - # allure.attach(name="authentication", body=str(query_4way)) - # - - @pytest.mark.hard - @pytest.mark.wpa2_personal - def test_multi_hard_roam_5g_to_5g(self, get_configuration, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - profile_data = setup_params_general["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 - lf_test.multi_hard_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, - lf_reports=lf_reports, - instantiate_profile=instantiate_profile, - ssid_name=ssid_name, security=security, security_key=security_key, - mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g", iteration=2, num_sta=1) - - @pytest.mark.testing - def test_testing(self, lf_test): - ret = lf_test.sniff_full_data(pcap_file="roam_11r2022-03-25-13-27.pcap") - print(ret) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# @allure.suite("Roam Test with attenuator") +# @allure.feature("Roam Test") +# # @pytest.mark.parametrize( +# # 'setup_configuration', +# # [setup_params_general], +# # indirect=True, +# # scope="class" +# # ) +# # @pytest.mark.usefixtures("setup_configuration") +# # @allure.step +# # def nested_step_allure(bssid, rssi): +# # pass +# +# class TestBasicRoam(object): +# +# @pytest.mark.roam_5g +# @pytest.mark.bob +# @pytest.mark.wpa2_personal +# def test_basic_roam_5g_to_5g(self, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] +# ssid_name = profile_data["ssid_name"] +# security_key = profile_data["security_key"] +# security = "wpa2" +# mode = "BRIDGE" +# band = "fiveg" +# vlan = 1 +# # lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, +# # lf_reports=lf_reports, +# # instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") +# +# +# @pytest.mark.multi_roam +# @pytest.mark.wpa2_personal +# @pytest.mark.wpa3_personal +# def test_multi_roam_5g_to_5g_soft_roam_11r(self, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# profile_data = setup_params_general["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 +# print("starting snifer") +# # lf_test.start_sniffer(radio_channel=36, radio="wiphy2", test_name="roam_11r", duration=3600) +# lf_test.create_n_clients(sta_prefix="wlan", num_sta=2, dut_ssid=ssid_name, +# dut_security=security, dut_passwd=security_key, radio="wiphy1", lf_tools=lf_tools, +# type="11r") +# +# # lf_test.multi_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, +# # lf_reports=lf_reports, +# # instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") +# # +# # print("stop sniff") +# # file_name = lf_test.stop_sniffer() +# # print(file_name) +# # print("wait for logs to be attached") +# # file_name = "roam_11r2022-03-23-00-02.pcap" +# # time.sleep(10) +# # query_auth = lf_test. query_sniff_data(pcap_file=str(file_name), filter="wlan.fc.type_subtype==0x000b") +# # print("query", query_auth) +# # allure.attach(name="authentication", body=str(query_auth)) +# # query_asso = lf_test.query_sniff_data(pcap_file=str(file_name), filter="wlan.fc.type_subtype==0x0000") +# # print("query", query_asso) +# # allure.attach(name="authentication", body=str(query_asso)) +# # query_reasso_response = lf_test.query_sniff_data(pcap_file=str(file_name), filter="(wlan.fc.type_subtype==3) && (wlan.tag.number==55)") +# # print("query", query_reasso_response) +# # allure.attach(name="authentication", body=str(query_reasso_response)) +# # query_4way = lf_test.query_sniff_data(pcap_file=str(file_name), filter="eapol") +# # print("query", query_4way) +# # allure.attach(name="authentication", body=str(query_4way)) +# # +# +# @pytest.mark.hard +# @pytest.mark.wpa2_personal +# def test_multi_hard_roam_5g_to_5g(self, lf_test, lf_reports, station_names_fiveg, lf_tools, run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# profile_data = setup_params_general["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 +# # lf_test.multi_hard_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, +# # lf_reports=lf_reports, +# # instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g", iteration=2, num_sta=1) +# +# @pytest.mark.testing +# def test_testing(self, lf_test): +# ret = lf_test.sniff_full_data(pcap_file="roam_11r2022-03-25-13-27.pcap") +# print(ret) +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# diff --git a/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_single_client.py b/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_single_client.py index f359b6e46..7ebfd99c2 100644 --- a/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_single_client.py +++ b/tests/e2e/advanced/roam_test/roam_by_attenuation/test_bridge_single_client.py @@ -1,208 +1,208 @@ -import time - -import pytest -import allure -# from configuration import CONFIGURATION - -pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] - -setup_params_general = { - "mode": "BRIDGE", - "roam": False, - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["6G"], "security_key": "something"} - ]}, - "rf": {}, - "radius": False -} -@allure.suite("Roam Test with attenuator") -@allure.feature("Roam Test") -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") - -class TestBasicRoam(object): - - - @pytest.mark.roam_2g - @pytest.mark.wpa2_personal - def test_basic_roam_2g(self, get_configuration, lf_test, station_names_twog, lf_tools, run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "twog" - vlan = 1 - - # calling basic roam from lf_test - roam =lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, instantiate_profile=instantiate_profile, - ssid_name=ssid_name, security=security, security_key=security_key, - mode=mode, band=band, station_name=station_names_twog, vlan=vlan, test="2g") - if roam: - assert True - else: - assert False - - - @pytest.mark.roam_5g - @pytest.mark.wpa2_personal - def test_basic_roam_5g(self, get_configuration, lf_test, station_names_fiveg, lf_tools, run_lf, add_env_properties, - instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - profile_data = setup_params_general["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 - roam = lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, - instantiate_profile=instantiate_profile, - ssid_name=ssid_name, security=security, security_key=security_key, - mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") - if roam: - assert True - else: - assert False - - @pytest.mark.sixg - @pytest.mark.wpa2_personal - @pytest.mark.wpa3_personal - def test_basic_roam_6g(self): - pass - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @pytest.mark.multi_roam_2g - # @pytest.mark.wpa2_personl - # def test_multiple_roam_2g(self, get_configuration, lf_test, station_names_twog, lf_tools, run_lf, add_env_properties, - # instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): - # profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - # ssid_name = profile_data["ssid_name"] - # security_key = profile_data["security_key"] - # security = "wpa2" - # mode = "BRIDGE" - # band = "twog" - # vlan = 1 - # c1_2g_bssid = "" - # c2_2g_bssid = "" - # if run_lf: - # c1_2g_bssid = get_configuration["access_point"][0]["ssid"]["2g-bssid"] - # allure.attach(name="bssid of ap1", body=c1_2g_bssid) - # c2_2g_bssid = get_configuration["access_point"][1]["ssid"]["2g-bssid"] - # allure.attach(name="bssid of ap2", body=c2_2g_bssid) - # ssid_name = get_configuration["access_point"][0]["ssid"]["2g-ssid"] - # else: - # for ap_name in range(len(get_configuration['access_point'])): - # instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], - # timeout="10", ap_data=get_configuration['access_point'], type=ap_name) - # bssid_2g = instantiate_profile_obj.cal_bssid_2g() - # if ap_name == 0 : - # c1_2g_bssid = bssid_2g - # if ap_name == 1: - # c2_2g_bssid = bssid_2g - # print("bssid of c1 ", c1_2g_bssid) - # allure.attach(name="bssid of ap1", body=c1_2g_bssid) - # print("bssid of c2", c2_2g_bssid) - # allure.attach(name="bssid of ap2", body=c2_2g_bssid) - # - # - # ser_no = lf_test.attenuator_serial() - # print(ser_no[0]) - # ser_1 = ser_no[0].split(".")[2] - # ser_2 = ser_no[1].split(".")[2] - # lf_tools.add_stations(band="2G", num_stations=3, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.Chamber_View() - # sta_list = lf_tools.get_station_list() - # print("sta_list", sta_list) - # lf_tools.admin_up_down(sta_list=sta_list, option="up") - # station = lf_test.wait_for_ip(station=sta_list) - # station_before = "" - # station_list = [] - # for i in range(len(sta_list)): - # station_list.append(sta_list[i].split(".")[2]) - # print(station_list) - # if station: - # lf_test.attach_stationdata_to_allure(name="staion info before roam", station_name=sta_list) - # for i in station_list: - # bssid = lf_tools.station_data_query(station_name=str(i), query="ap") - # formated_bssid = bssid.lower() - # if formated_bssid == c1_2g_bssid: - # print("station connected to chamber1 ap") - # station_before = formated_bssid - # elif formated_bssid == c2_2g_bssid: - # print("station connected to chamber 2 ap") - # station_before = formated_bssid - # # logic to decrease c1 attenuation and increase c2 attenuation - # for atten_val1, atten_val2 in zip([0, 100, 300, 500, 750, 950], [950, 750, 500, 300, 100, 0]): - # print(atten_val1) - # print(atten_val2) - # for i in range(4): - # lf_test.attenuator_modify(int(ser_1), i, atten_val1) - # lf_test.attenuator_modify(int(ser_2), i, atten_val2) - # time.sleep(10) - # lf_tools.admin_up_down(sta_list=station_list, option="down") - # time.sleep(15) - # lf_tools.admin_up_down(sta_list=station_list, option="up") - # time.sleep(15) - # for i in station_list: - # bssid = lf_tools.station_data_query(station_name=str(i), query="ap") - # station_after = bssid.lower() - # if station_after == station_before: - # continue - # elif station_after != station_before: - # print("client performed roam") - # lf_test.attach_stationdata_to_allure(name="staion info after roam", station_name=i) - # allure.attach(name="attenuation_data", body="ap1 was at attenuation value " + str(atten_val2) + "ddbm and ap2 was at attenuation value " + str(atten_val1) + "ddbm") - # break - # - # else: - # allure.attach(name="FAIL", body="stations failed to get ip") - # assert False - # - - - - - - - - - - - +# import time +# +# import pytest +# import allure +# # from configuration import CONFIGURATION +# +# pytestmark = [pytest.mark.roam_test, pytest.mark.bridge] +# +# setup_params_general = { +# "mode": "BRIDGE", +# "roam": False, +# "ssid_modes": { +# "wpa2_personal": [ +# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}], +# "wpa3_personal": [ +# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["6G"], "security_key": "something"} +# ]}, +# "rf": {}, +# "radius": False +# } +# @allure.suite("Roam Test with attenuator") +# @allure.feature("Roam Test") +# # @pytest.mark.parametrize( +# # 'setup_configuration', +# # [setup_params_general], +# # indirect=True, +# # scope="class" +# # ) +# # @pytest.mark.usefixtures("setup_configuration") +# +# class TestBasicRoam(object): +# +# +# @pytest.mark.roam_2g +# @pytest.mark.wpa2_personal +# def test_basic_roam_2g(self, lf_test, station_names_twog, lf_tools, run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# +# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] +# ssid_name = profile_data["ssid_name"] +# security_key = profile_data["security_key"] +# security = "wpa2" +# mode = "BRIDGE" +# band = "twog" +# vlan = 1 +# +# # calling basic roam from lf_test +# # roam =lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # mode=mode, band=band, station_name=station_names_twog, vlan=vlan, test="2g") +# # if roam: +# # assert True +# # else: +# # assert False +# +# +# @pytest.mark.roam_5g +# @pytest.mark.wpa2_personal +# def test_basic_roam_5g(self, lf_test, station_names_fiveg, lf_tools, run_lf, add_env_properties, +# instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# profile_data = setup_params_general["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 +# # roam = lf_test.basic_roam(run_lf=run_lf, get_configuration=get_configuration, lf_tools=lf_tools, +# # instantiate_profile=instantiate_profile, +# # ssid_name=ssid_name, security=security, security_key=security_key, +# # mode=mode, band=band, station_name=station_names_fiveg, vlan=vlan, test="5g") +# # if roam: +# # assert True +# # else: +# # assert False +# +# @pytest.mark.sixg +# @pytest.mark.wpa2_personal +# @pytest.mark.wpa3_personal +# def test_basic_roam_6g(self): +# pass +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# # @pytest.mark.multi_roam_2g +# # @pytest.mark.wpa2_personl +# # def test_multiple_roam_2g(self, get_configuration, lf_test, station_names_twog, lf_tools, run_lf, add_env_properties, +# # instantiate_profile, get_controller_logs, get_ap_config_slots, get_lf_logs): +# # profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] +# # ssid_name = profile_data["ssid_name"] +# # security_key = profile_data["security_key"] +# # security = "wpa2" +# # mode = "BRIDGE" +# # band = "twog" +# # vlan = 1 +# # c1_2g_bssid = "" +# # c2_2g_bssid = "" +# # if run_lf: +# # c1_2g_bssid = get_configuration["access_point"][0]["ssid"]["2g-bssid"] +# # allure.attach(name="bssid of ap1", body=c1_2g_bssid) +# # c2_2g_bssid = get_configuration["access_point"][1]["ssid"]["2g-bssid"] +# # allure.attach(name="bssid of ap2", body=c2_2g_bssid) +# # ssid_name = get_configuration["access_point"][0]["ssid"]["2g-ssid"] +# # else: +# # for ap_name in range(len(get_configuration['access_point'])): +# # instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], +# # timeout="10", ap_data=get_configuration['access_point'], type=ap_name) +# # bssid_2g = instantiate_profile_obj.cal_bssid_2g() +# # if ap_name == 0 : +# # c1_2g_bssid = bssid_2g +# # if ap_name == 1: +# # c2_2g_bssid = bssid_2g +# # print("bssid of c1 ", c1_2g_bssid) +# # allure.attach(name="bssid of ap1", body=c1_2g_bssid) +# # print("bssid of c2", c2_2g_bssid) +# # allure.attach(name="bssid of ap2", body=c2_2g_bssid) +# # +# # +# # ser_no = lf_test.attenuator_serial() +# # print(ser_no[0]) +# # ser_1 = ser_no[0].split(".")[2] +# # ser_2 = ser_no[1].split(".")[2] +# # lf_tools.add_stations(band="2G", num_stations=3, dut=lf_tools.dut_name, ssid_name=ssid_name) +# # lf_tools.Chamber_View() +# # sta_list = lf_tools.get_station_list() +# # print("sta_list", sta_list) +# # lf_tools.admin_up_down(sta_list=sta_list, option="up") +# # station = lf_test.wait_for_ip(station=sta_list) +# # station_before = "" +# # station_list = [] +# # for i in range(len(sta_list)): +# # station_list.append(sta_list[i].split(".")[2]) +# # print(station_list) +# # if station: +# # lf_test.attach_stationdata_to_allure(name="staion info before roam", station_name=sta_list) +# # for i in station_list: +# # bssid = lf_tools.station_data_query(station_name=str(i), query="ap") +# # formated_bssid = bssid.lower() +# # if formated_bssid == c1_2g_bssid: +# # print("station connected to chamber1 ap") +# # station_before = formated_bssid +# # elif formated_bssid == c2_2g_bssid: +# # print("station connected to chamber 2 ap") +# # station_before = formated_bssid +# # # logic to decrease c1 attenuation and increase c2 attenuation +# # for atten_val1, atten_val2 in zip([0, 100, 300, 500, 750, 950], [950, 750, 500, 300, 100, 0]): +# # print(atten_val1) +# # print(atten_val2) +# # for i in range(4): +# # lf_test.attenuator_modify(int(ser_1), i, atten_val1) +# # lf_test.attenuator_modify(int(ser_2), i, atten_val2) +# # time.sleep(10) +# # lf_tools.admin_up_down(sta_list=station_list, option="down") +# # time.sleep(15) +# # lf_tools.admin_up_down(sta_list=station_list, option="up") +# # time.sleep(15) +# # for i in station_list: +# # bssid = lf_tools.station_data_query(station_name=str(i), query="ap") +# # station_after = bssid.lower() +# # if station_after == station_before: +# # continue +# # elif station_after != station_before: +# # print("client performed roam") +# # lf_test.attach_stationdata_to_allure(name="staion info after roam", station_name=i) +# # allure.attach(name="attenuation_data", body="ap1 was at attenuation value " + str(atten_val2) + "ddbm and ap2 was at attenuation value " + str(atten_val1) + "ddbm") +# # break +# # +# # else: +# # allure.attach(name="FAIL", body="stations failed to get ip") +# # assert False +# # +# +# +# +# +# +# +# +# +# +# +# diff --git a/tests/e2e/advanced/spatial_consistency/wpa2_personal/test_bridge_spatial.py b/tests/e2e/advanced/spatial_consistency/wpa2_personal/test_bridge_spatial.py index ec005cc5d..6def9e90f 100644 --- a/tests/e2e/advanced/spatial_consistency/wpa2_personal/test_bridge_spatial.py +++ b/tests/e2e/advanced/spatial_consistency/wpa2_personal/test_bridge_spatial.py @@ -23,12 +23,12 @@ setup_params_general = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class Test_SpatialConsistency_Bridge(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5052", name="WIFI-5052") @@ -36,7 +36,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss1 @pytest.mark.degree0 - def test_nss1_wpa2_personal_2g_10db_0degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration ): + def test_nss1_wpa2_personal_2g_10db_0degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration ): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] @@ -102,7 +102,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss2 @pytest.mark.degree0 - def test_nss2_wpa2_personal_2g_10db_0degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss2_wpa2_personal_2g_10db_0degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -169,7 +169,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss1 @pytest.mark.degree60 - def test_nss1_wpa2_personal_2g_10db_60degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss1_wpa2_personal_2g_10db_60degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -236,7 +236,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss2 @pytest.mark.degree60 - def test_nss2_wpa2_personal_2g_10db_60degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss2_wpa2_personal_2g_10db_60degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -303,7 +303,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss1 @pytest.mark.degree120 - def test_nss1_wpa2_personal_2g_10db_120degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss1_wpa2_personal_2g_10db_120degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -371,7 +371,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss2 @pytest.mark.degree120 - def test_nss2_wpa2_personal_2g_10db_120degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss2_wpa2_personal_2g_10db_120degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -439,7 +439,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss1 @pytest.mark.degree240 - def test_nss1_wpa2_personal_2g_10db_240degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss1_wpa2_personal_2g_10db_240degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -507,7 +507,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss2 @pytest.mark.degree240 - def test_nss2_wpa2_personal_2g_10db_240degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss2_wpa2_personal_2g_10db_240degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -575,7 +575,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss1 @pytest.mark.degree300 - def test_nss1_wpa2_personal_2g_10db_300degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss1_wpa2_personal_2g_10db_300degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -643,7 +643,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.twog @pytest.mark.nss2 @pytest.mark.degree300 - def test_nss2_wpa2_personal_2g_10db_300degree(self, setup_profiles, lf_tools, lf_test, station_names_twog, + def test_nss2_wpa2_personal_2g_10db_300degree(self, setup_configuration, lf_tools, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] @@ -711,7 +711,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss1 @pytest.mark.degree0 - def test_nss1_wpa2_personal_5g_10db_0degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss1_wpa2_personal_5g_10db_0degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -779,7 +779,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss2 @pytest.mark.degree0 - def test_nss2_wpa2_personal_5g_10db_0degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss2_wpa2_personal_5g_10db_0degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -847,7 +847,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss1 @pytest.mark.degree60 - def test_nss1_wpa2_personal_5g_10db_60degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss1_wpa2_personal_5g_10db_60degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -915,7 +915,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss2 @pytest.mark.degree60 - def test_nss2_wpa2_personal_5g_10db_60degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss2_wpa2_personal_5g_10db_60degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -983,7 +983,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss1 @pytest.mark.degree120 - def test_nss1_wpa2_personal_5g_10db_120degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss1_wpa2_personal_5g_10db_120degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -1050,7 +1050,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss2 @pytest.mark.degree120 - def test_nss2_wpa2_personal_5g_10db_120degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss2_wpa2_personal_5g_10db_120degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -1117,7 +1117,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss1 @pytest.mark.degree240 - def test_nss1_wpa2_personal_5g_10db_240degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss1_wpa2_personal_5g_10db_240degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -1185,7 +1185,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss2 @pytest.mark.degree240 - def test_nss2_wpa2_personal_5g_10db_240degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss2_wpa2_personal_5g_10db_240degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -1253,7 +1253,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss1 @pytest.mark.degree300 - def test_nss1_wpa2_personal_5g_10db_300degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss1_wpa2_personal_5g_10db_300degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] @@ -1320,7 +1320,7 @@ class Test_SpatialConsistency_Bridge(object): @pytest.mark.fiveg @pytest.mark.nss2 @pytest.mark.degree300 - def test_nss2_wpa2_personal_5g_10db_300degree(self, setup_profiles, lf_tools, lf_test, station_names_fiveg, + def test_nss2_wpa2_personal_5g_10db_300degree(self, setup_configuration, lf_tools, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] diff --git a/tests/e2e/basic/README.md b/tests/e2e/basic/README.md index e041b4910..753729922 100644 --- a/tests/e2e/basic/README.md +++ b/tests/e2e/basic/README.md @@ -64,12 +64,12 @@ profile_config = { # Class level Marking @pytest.mark.suite_a @pytest.mark.parametrize( - 'setup_profiles', # Name of the fixture + 'setup_configuration', # Name of the fixture [profile_config], # Passing the above static profile_config data for setup for tests in this class indirect=True, scope="class" # Scope of the fixture (Its experimental for current framework (keep it "class" for default scenario)) ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestFeatureABridge(object): @pytest.mark.wpa # Marker for the wifi encryption needed - Compulsory diff --git a/tests/e2e/basic/configuration_tests/bridge_mode/test_enterprise_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/bridge_mode/test_enterprise_security_modes_configuration.py index 1fc761638..376f728e2 100644 --- a/tests/e2e/basic/configuration_tests/bridge_mode/test_enterprise_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/bridge_mode/test_enterprise_security_modes_configuration.py @@ -32,74 +32,74 @@ setup_params_enterprise = { @pytest.mark.suiteA @allure.feature("BRIDGE MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupBridgeEnterpriseSuiteA(object): """ Enterprise SSID Suite-A""" @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 2.4G """ - assert setup_profiles['wpa_enterprise_2g'] + assert setup_configuration['wpa_enterprise_2g'] @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 5G """ - assert setup_profiles['wpa_enterprise_5g'] + assert setup_configuration['wpa_enterprise_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa2_enterprise_2g'] + assert setup_configuration['wpa2_enterprise_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa2_enterprise_5g'] + assert setup_configuration['wpa2_enterprise_5g'] @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_2g'] + assert setup_configuration['wpa3_enterprise_2g'] @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 5G """ - assert setup_profiles['wpa3_enterprise_5g'] + assert setup_configuration['wpa3_enterprise_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite A Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite A Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_enterprise_two = { @@ -120,55 +120,55 @@ setup_params_enterprise_two = { @pytest.mark.suiteB @allure.feature("BRIDGE MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupBridgeEnterpriseSuiteB(object): """ Enterprise SSID Suite-B""" @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_2g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_2g'] @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_5g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_5g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_mixed_2g'] + assert setup_configuration['wpa3_enterprise_mixed_2g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 5G """ - assert setup_profiles['wpa3_enterprise_mixed_5g'] + assert setup_configuration['wpa3_enterprise_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite B Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF State Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] diff --git a/tests/e2e/basic/configuration_tests/bridge_mode/test_general_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/bridge_mode/test_general_security_modes_configuration.py index 12b142ae9..ba3c8a87b 100644 --- a/tests/e2e/basic/configuration_tests/bridge_mode/test_general_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/bridge_mode/test_general_security_modes_configuration.py @@ -32,12 +32,12 @@ setup_params_general = { @pytest.mark.suiteA @allure.feature("BRIDGE MODE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupBridgeSuiteA(object): """ General Security Modes: SuiteA pytest -m "setup and bridge and general and suiteA" @@ -45,77 +45,77 @@ class TestSetupBridgeSuiteA(object): @pytest.mark.open @pytest.mark.twog - def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 2.4G pytest -m "setup and bridge and general and suiteA and open and twog" """ - assert setup_profiles['open_2g'] + assert setup_configuration['open_2g'] @pytest.mark.open @pytest.mark.fiveg - def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 5G pytest -m "setup and bridge and general and suiteA and open and fiveg" """ - assert setup_profiles['open_5g'] + assert setup_configuration['open_5g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.twog - def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 2.4G pytest -m "setup and bridge and general and suiteA and wpa and twog" """ - assert setup_profiles['wpa_2g'] + assert setup_configuration['wpa_2g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg - def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 5G pytest -m "setup and bridge and general and suiteA and wpa and fiveg" """ - assert setup_profiles['wpa_5g'] + assert setup_configuration['wpa_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog - def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 2.4G pytest -m "setup and bridge and general and suiteA and wpa2_personal and twog" """ - assert setup_profiles['wpa2_personal_2g'] + assert setup_configuration['wpa2_personal_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 5G pytest -m "setup and bridge and general and suiteA and wpa2_personal and fiveg" """ - assert setup_profiles['wpa2_personal_5g'] + assert setup_configuration['wpa2_personal_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile SuiteA General """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vifc SuiteA General """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vifs SuiteA General """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_general_two = { @@ -142,82 +142,82 @@ setup_params_general_two = { @pytest.mark.suiteB @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeConnectivitySuiteB(object): """ General Security Modes: SuiteB """ @pytest.mark.wpa3_personal @pytest.mark.twog - def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 2.4G pytest -m "setup and bridge and general and suiteB and wpa3_personal and twog" """ - assert setup_profiles['wpa3_personal_2g'] + assert setup_configuration['wpa3_personal_2g'] @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 5G pytest -m "setup and bridge and general and suiteB and wpa3_personal and fiveg" """ - assert setup_profiles['wpa3_personal_5g'] + assert setup_configuration['wpa3_personal_5g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 2.4G pytest -m "setup and bridge and general and suiteB and wpa3_personal_mixed and twog" """ - assert setup_profiles['wpa3_personal_mixed_2g'] + assert setup_configuration['wpa3_personal_mixed_2g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 5G pytest -m "setup and bridge and general and suiteB and wpa3_personal_mixed and fiveg" """ - assert setup_profiles['wpa3_personal_mixed_5g'] + assert setup_configuration['wpa3_personal_mixed_5g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 2.4G pytest -m "setup and bridge and general and suiteB and wpa_wpa2_personal_mixed and twog" """ - assert setup_profiles['wpa_wpa2_personal_mixed_2g'] + assert setup_configuration['wpa_wpa2_personal_mixed_2g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 5G pytest -m "setup and bridge and general and suiteB and wpa_wpa2_personal_mixed and fiveg" """ - assert setup_profiles['wpa_wpa2_personal_mixed_5g'] + assert setup_configuration['wpa_wpa2_personal_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Suite B """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vif config Suite B """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vif state Suite B """ time.sleep(200) - assert setup_profiles['vifs'] \ No newline at end of file + assert setup_configuration['vifs'] \ No newline at end of file diff --git a/tests/e2e/basic/configuration_tests/nat_mode/test_enterprise_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/nat_mode/test_enterprise_security_modes_configuration.py index f8dd43659..c6ce0e53c 100644 --- a/tests/e2e/basic/configuration_tests/nat_mode/test_enterprise_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/nat_mode/test_enterprise_security_modes_configuration.py @@ -32,74 +32,74 @@ setup_params_enterprise = { @pytest.mark.suiteA @allure.feature("NAT MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupNATEnterpriseSuiteA(object): """ Enterprise SSID Suite-A""" @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 2.4G """ - assert setup_profiles['wpa2_enterprise_2g'] + assert setup_configuration['wpa2_enterprise_2g'] @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 5G """ - assert setup_profiles['wpa2_enterprise_5g'] + assert setup_configuration['wpa2_enterprise_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa2_enterprise_2g'] + assert setup_configuration['wpa2_enterprise_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa2_enterprise_5g'] + assert setup_configuration['wpa2_enterprise_5g'] @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_2g'] + assert setup_configuration['wpa3_enterprise_2g'] @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 5G """ - assert setup_profiles['wpa3_enterprise_5g'] + assert setup_configuration['wpa3_enterprise_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite A Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite A Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_enterprise_two = { @@ -120,54 +120,54 @@ setup_params_enterprise_two = { @pytest.mark.suiteB @allure.feature("NAT MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupNATEnterpriseSuiteB(object): """ Enterprise SSID Suite-B""" @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_2g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_2g'] @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_5g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_5g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_mixed_2g'] + assert setup_configuration['wpa3_enterprise_mixed_2g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 5G """ - assert setup_profiles['wpa3_enterprise_mixed_5g'] + assert setup_configuration['wpa3_enterprise_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite B Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF State Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] diff --git a/tests/e2e/basic/configuration_tests/nat_mode/test_general_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/nat_mode/test_general_security_modes_configuration.py index cc55c840e..f758a55cb 100644 --- a/tests/e2e/basic/configuration_tests/nat_mode/test_general_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/nat_mode/test_general_security_modes_configuration.py @@ -32,12 +32,12 @@ setup_params_general = { @pytest.mark.suiteA @allure.feature("NAT MODE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupNATSuiteA(object): """ General Security Modes: SuiteA pytest -m "setup and nat and general and suiteA" @@ -45,90 +45,90 @@ class TestSetupNATSuiteA(object): @pytest.mark.open @pytest.mark.twog - def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 2.4G pytest -m "setup and nat and general and suiteA and open and twog" """ - assert setup_profiles['open_2g'] + assert setup_configuration['open_2g'] @pytest.mark.open @pytest.mark.fiveg - def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 5G pytest -m "setup and nat and general and suiteA and open and fiveg" """ - assert setup_profiles['open_5g'] + assert setup_configuration['open_5g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.twog - def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 2.4G pytest -m "setup and nat and general and suiteA and wpa and twog" """ - assert setup_profiles['wpa_2g'] + assert setup_configuration['wpa_2g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg - def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 5G pytest -m "setup and nat and general and suiteA and wpa and fiveg" """ - assert setup_profiles['wpa_5g'] + assert setup_configuration['wpa_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog - def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 2.4G pytest -m "setup and nat and general and suiteA and wpa2_personal and twog" """ - assert setup_profiles['wpa2_personal_2g'] + assert setup_configuration['wpa2_personal_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 5G pytest -m "setup and nat and general and suiteA and wpa2_personal and fiveg" """ - assert setup_profiles['wpa2_personal_5g'] + assert setup_configuration['wpa2_personal_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile SuiteA General """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vifc SuiteA General """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vifs SuiteA General """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_general_two = { @@ -155,81 +155,81 @@ setup_params_general_two = { @pytest.mark.suiteB @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestNATModeConnectivitySuiteB(object): """ General Security Modes: SuiteB """ @pytest.mark.wpa3_personal @pytest.mark.twog - def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 2.4G pytest -m "setup and nat and general and suiteB and wpa3_personal and twog" """ - assert setup_profiles['wpa3_personal_2g'] + assert setup_configuration['wpa3_personal_2g'] @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 5G pytest -m "setup and nat and general and suiteB and wpa3_personal and fiveg" """ - assert setup_profiles['wpa3_personal_5g'] + assert setup_configuration['wpa3_personal_5g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 2.4G pytest -m "setup and nat and general and suiteB and wpa3_personal_mixed and twog" """ - assert setup_profiles['wpa3_personal_mixed_2g'] + assert setup_configuration['wpa3_personal_mixed_2g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 5G pytest -m "setup and nat and general and suiteB and wpa3_personal_mixed and fiveg" """ - assert setup_profiles['wpa3_personal_mixed_5g'] + assert setup_configuration['wpa3_personal_mixed_5g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 2.4G pytest -m "setup and nat and general and suiteB and wpa_wpa2_personal_mixed and twog" """ - assert setup_profiles['wpa_wpa2_personal_mixed_2g'] + assert setup_configuration['wpa_wpa2_personal_mixed_2g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 5G pytest -m "setup and nat and general and suiteB and wpa_wpa2_personal_mixed and fiveg" """ - assert setup_profiles['wpa_wpa2_personal_mixed_5g'] + assert setup_configuration['wpa_wpa2_personal_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Suite B """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vif config Suite B """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vif state Suite B """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] diff --git a/tests/e2e/basic/configuration_tests/vlan_mode/test_enterprise_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/vlan_mode/test_enterprise_security_modes_configuration.py index 9f30e043b..379bbbb04 100644 --- a/tests/e2e/basic/configuration_tests/vlan_mode/test_enterprise_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/vlan_mode/test_enterprise_security_modes_configuration.py @@ -32,76 +32,76 @@ setup_params_enterprise = { @pytest.mark.suiteA @allure.feature("VLAN MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupVLANEnterpriseSuiteA(object): """ Enterprise SSID Suite-A""" @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 2.4G """ - assert setup_profiles['wpa2_enterprise_2g'] + assert setup_configuration['wpa2_enterprise_2g'] @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA Enterprise SSID 5G """ - assert setup_profiles['wpa2_enterprise_5g'] + assert setup_configuration['wpa2_enterprise_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa2_enterprise_2g'] + assert setup_configuration['wpa2_enterprise_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa2_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa2_enterprise_5g'] + assert setup_configuration['wpa2_enterprise_5g'] @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_2g'] + assert setup_configuration['wpa3_enterprise_2g'] @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise SSID 5G """ - assert setup_profiles['wpa3_enterprise_5g'] + assert setup_configuration['wpa3_enterprise_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite A Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite A Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_enterprise_two = { @@ -122,54 +122,54 @@ setup_params_enterprise_two = { @pytest.mark.suiteB @allure.feature("VLAN MODE ENTERPRISE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupVLANEnterpriseSuiteB(object): """ Enterprise SSID Suite-B""" @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 2.4G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_2g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_2g'] @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_wpa2_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA WPA2 Enterprise SSID 5G """ - assert setup_profiles['wpa_wpa2_enterprise_mixed_5g'] + assert setup_configuration['wpa_wpa2_enterprise_mixed_5g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_enterprise_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 2.4G """ - assert setup_profiles['wpa3_enterprise_mixed_2g'] + assert setup_configuration['wpa3_enterprise_mixed_2g'] @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa3_enterprise_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ WPA3 Enterprise Mixed SSID 5G """ - assert setup_profiles['wpa3_enterprise_mixed_5g'] + assert setup_configuration['wpa3_enterprise_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile Suite B Enterprise """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ VIF Config Suite B Enterprise """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ VIF State Suite B Enterprise """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] diff --git a/tests/e2e/basic/configuration_tests/vlan_mode/test_general_security_modes_configuration.py b/tests/e2e/basic/configuration_tests/vlan_mode/test_general_security_modes_configuration.py index 2b9277c38..cae2eaab7 100644 --- a/tests/e2e/basic/configuration_tests/vlan_mode/test_general_security_modes_configuration.py +++ b/tests/e2e/basic/configuration_tests/vlan_mode/test_general_security_modes_configuration.py @@ -32,12 +32,12 @@ setup_params_general = { @pytest.mark.suiteA @allure.feature("VLAN MODE SETUP") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestSetupVLANSuiteA(object): """ General Security Modes: SuiteA pytest -m "setup and vlan and general and suiteA" @@ -45,78 +45,78 @@ class TestSetupVLANSuiteA(object): @pytest.mark.open @pytest.mark.twog - def test_setup_open_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 2.4G pytest -m "setup and vlan and general and suiteA and open and twog" """ - assert setup_profiles['open_2g'] + assert setup_configuration['open_2g'] @pytest.mark.open @pytest.mark.fiveg - def test_setup_open_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_open_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation open 5G pytest -m "setup and vlan and general and suiteA and open and fiveg" """ - assert setup_profiles['open_5g'] + assert setup_configuration['open_5g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.twog - def test_setup_wpa_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 2.4G pytest -m "setup and vlan and general and suiteA and wpa and twog" """ - assert setup_profiles['wpa_2g'] + assert setup_configuration['wpa_2g'] @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg - def test_setup_wpa_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa 5G pytest -m "setup and vlan and general and suiteA and wpa and fiveg" """ - assert setup_profiles['wpa_5g'] + assert setup_configuration['wpa_5g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog - def test_setup_wpa2_personal_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 2.4G pytest -m "setup and vlan and general and suiteA and wpa2_personal and twog" """ - assert setup_profiles['wpa2_personal_2g'] + assert setup_configuration['wpa2_personal_2g'] @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_setup_wpa2_personal_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa2_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa2_personal 5G pytest -m "setup and vlan and general and suiteA and wpa2_personal and fiveg" """ - assert setup_profiles['wpa2_personal_5g'] + assert setup_configuration['wpa2_personal_5g'] @pytest.mark.sanity_light - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Profile SuiteA General """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] @pytest.mark.sanity_light - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vifc SuiteA General """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @pytest.mark.sanity_light @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vifs SuiteA General """ time.sleep(200) - assert setup_profiles['vifs'] + assert setup_configuration['vifs'] setup_params_general_two = { @@ -143,82 +143,82 @@ setup_params_general_two = { @pytest.mark.suiteB @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestVLANModeConnectivitySuiteB(object): """ General Security Modes: SuiteB """ @pytest.mark.wpa3_personal @pytest.mark.twog - def test_setup_wpa3_personal_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 2.4G pytest -m "setup and vlan and general and suiteB and wpa3_personal and twog" """ - assert setup_profiles['wpa3_personal_2g'] + assert setup_configuration['wpa3_personal_2g'] @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_setup_wpa3_personal_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal 5G pytest -m "setup and vlan and general and suiteB and wpa3_personal and fiveg" """ - assert setup_profiles['wpa3_personal_5g'] + assert setup_configuration['wpa3_personal_5g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 2.4G pytest -m "setup and vlan and general and suiteB and wpa3_personal_mixed and twog" """ - assert setup_profiles['wpa3_personal_mixed_2g'] + assert setup_configuration['wpa3_personal_mixed_2g'] @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, test_cases): + def test_setup_wpa3_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa3_personal_mixed 5G pytest -m "setup and vlan and general and suiteB and wpa3_personal_mixed and fiveg" """ - assert setup_profiles['wpa3_personal_mixed_5g'] + assert setup_configuration['wpa3_personal_mixed_5g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog - def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_2g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 2.4G pytest -m "setup and vlan and general and suiteB and wpa_wpa2_personal_mixed and twog" """ - assert setup_profiles['wpa_wpa2_personal_mixed_2g'] + assert setup_configuration['wpa_wpa2_personal_mixed_2g'] @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg - def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_profiles, update_report, + def test_setup_wpa_wpa2_personal_mixed_5g_ssid_profile(self, setup_configuration, update_report, test_cases): """ SSID Profile Creation wpa_wpa2_personal_mixed 5G pytest -m "setup and vlan and general and suiteB and wpa_wpa2_personal_mixed and fiveg" """ - assert setup_profiles['wpa_wpa2_personal_mixed_5g'] + assert setup_configuration['wpa_wpa2_personal_mixed_5g'] - def test_setup_equipment_ap_profile(self, setup_profiles, update_report, + def test_setup_equipment_ap_profile(self, setup_configuration, update_report, test_cases): """ Equipment AP Suite B """ - assert setup_profiles['equipment_ap'] + assert setup_configuration['equipment_ap'] - def test_verify_vif_config(self, setup_profiles, update_report, + def test_verify_vif_config(self, setup_configuration, update_report, test_cases): """ vif config Suite B """ - assert setup_profiles['vifc'] + assert setup_configuration['vifc'] @allure.severity(allure.severity_level.BLOCKER) - def test_verify_vif_state(self, setup_profiles, update_report, + def test_verify_vif_state(self, setup_configuration, update_report, test_cases): """ vif state Suite B """ time.sleep(200) - assert setup_profiles['vifs'] \ No newline at end of file + assert setup_configuration['vifs'] \ No newline at end of file diff --git a/tests/e2e/basic/conftest.1 b/tests/e2e/basic/conftest.1 new file mode 100644 index 000000000..e9811d3f5 --- /dev/null +++ b/tests/e2e/basic/conftest.1 @@ -0,0 +1,152 @@ +# import json +# import os +# import sys +# +# sys.path.append( +# os.path.dirname( +# os.path.realpath(__file__) +# ) +# ) +# if "libs" not in sys.path: +# sys.path.append(f'../libs') +# +# from controller.controller_1x.controller import ProfileUtility +# from controller.controller_2x.controller import UProfileUtility +# from controller.controller_3x.controller import CController +# import time +# from lanforge.lf_tools import ChamberView +# import pytest +# import allure +# +# +# @pytest.fixture(scope="session") +# def instantiate_profile(request): +# if request.config.getoption("1.x"): +# yield ProfileUtility +# elif request.config.getoption("cc.1"): +# yield CController +# else: +# yield UProfileUtility +# +# +# @pytest.fixture(scope="session") +# def create_lanforge_chamberview(lf_tools): +# scenario_object, scenario_name = lf_tools.Chamber_View() +# return scenario_name +# +# +# @pytest.fixture(scope="session") +# def create_lanforge_chamberview_dut(lf_tools, run_lf): +# if not run_lf: +# dut_object, dut_name = lf_tools.Create_Dut() +# return dut_name +# return "" +# +# +# @pytest.fixture(scope="class") +# def setup_configuration(request, setup_controller, testbed, get_equipment_ref, fixtures_ver, reset_scenario_lf, +# instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, run_lf, +# get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info, cc_1): +# param = dict(request.param) +# +# # VLAN Setup +# if request.param["mode"] == "VLAN": +# +# vlan_list = list() +# refactored_vlan_list = list() +# ssid_modes = request.param["ssid_modes"].keys() +# for mode in ssid_modes: +# for ssid in range(len(request.param["ssid_modes"][mode])): +# if "vlan" in request.param["ssid_modes"][mode][ssid]: +# vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) +# else: +# pass +# if vlan_list: +# [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] +# vlan_list = refactored_vlan_list +# for i in range(len(vlan_list)): +# if vlan_list[i] > 4095 or vlan_list[i] < 1: +# vlan_list.pop(i) +# if request.param["mode"] == "VLAN": +# lf_tools.reset_scenario() +# lf_tools.add_vlan(vlan_ids=vlan_list) +# +# # call this, if 1.x +# print("fixture version ", fixtures_ver) +# if cc_1: +# return_var = fixtures_ver.setup_configuration(request, param, run_lf, instantiate_profile, get_configuration, get_markers, lf_tools) +# else: +# return_var = fixtures_ver.setup_configuration(request, param, setup_controller, testbed, get_equipment_ref, +# instantiate_profile, +# get_markers, create_lanforge_chamberview_dut, lf_tools, +# get_security_flags, get_configuration, radius_info, get_apnos, +# radius_accounting_info, run_lf=run_lf) +# +# yield return_var +# +# +# @pytest.fixture(scope="session") +# def station_names_twog(request, get_configuration): +# station_names = [] +# for i in range(0, int(request.config.getini("num_stations"))): +# station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i)) +# yield station_names +# +# +# @pytest.fixture(scope="session") +# def station_names_fiveg(request, get_configuration): +# station_names = [] +# for i in range(0, int(request.config.getini("num_stations"))): +# station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i)) +# yield station_names +# +# +# @pytest.fixture(scope="session") +# def station_names_ax(request, get_configuration): +# station_names = [] +# for i in range(0, int(request.config.getini("num_stations"))): +# station_names.append(get_configuration["traffic_generator"]["details"]["AX-Station-Name"] + "0" + str(i)) +# yield station_names +# +# +# @pytest.fixture(scope="session") +# def num_stations(request): +# num_sta = int(request.config.getini("num_stations")) +# yield num_sta +# +# +# @pytest.fixture(scope="class") +# def get_vif_state(get_apnos, get_configuration, request, lf_tools, run_lf): +# if request.config.getoption("1.x"): +# ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") +# vif_state = list(ap_ssh.get_vif_state_ssids()) +# vif_state.sort() +# yield vif_state +# else: +# yield lf_tools.ssid_list +# +# +# @pytest.fixture(scope="session") +# def dfs_start(fixtures_ver, get_apnos, get_configuration): +# dfs_start = fixtures_ver.dfs(get_apnos, get_configuration) +# yield dfs_start +# +# +# @pytest.fixture(scope="class") +# def get_vlan_list(get_apnos, get_configuration): +# ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") +# vlan_list = list(ap_ssh.get_vlan()) +# vlan_list.sort() +# yield vlan_list +# +# +# @pytest.fixture(scope="session") +# def reset_scenario_lf(request, lf_tools, run_lf): +# if not run_lf: +# lf_tools.reset_scenario() +# def teardown_session(): +# lf_tools.reset_scenario() +# +# request.addfinalizer(teardown_session) +# yield "" +# diff --git a/tests/e2e/basic/conftest.py b/tests/e2e/basic/conftest.py index ee36f7307..bb0795128 100644 --- a/tests/e2e/basic/conftest.py +++ b/tests/e2e/basic/conftest.py @@ -1,152 +1,24 @@ -import json -import os -import sys - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') - -from controller.controller_1x.controller import ProfileUtility -from controller.controller_2x.controller import UProfileUtility -from controller.controller_3x.controller import CController -import time -from lanforge.lf_tools import ChamberView -import pytest import allure +import pytest +import logging +@pytest.fixture(scope="class") +def setup_configuration(request, get_markers, get_target_object, run_lf): + # Predefined selected markers and selected configuration -@pytest.fixture(scope="session") -def instantiate_profile(request): - if request.config.getoption("1.x"): - yield ProfileUtility - elif request.config.getoption("cc.1"): - yield CController - else: - yield UProfileUtility + conf = dict(request.param) + configuration = conf.copy() + requested_combination = [] + for key in get_markers: + if get_markers[key]: + requested_combination.append(get_markers[key]) - -@pytest.fixture(scope="session") -def create_lanforge_chamberview(lf_tools): - scenario_object, scenario_name = lf_tools.Chamber_View() - return scenario_name - - -@pytest.fixture(scope="session") -def create_lanforge_chamberview_dut(lf_tools, run_lf): + # Method to setup the basic configuration + data = {} if not run_lf: - dut_object, dut_name = lf_tools.Create_Dut() - return dut_name - return "" + data = get_target_object.setup_basic_configuration(configuration=configuration, + requested_combination=requested_combination) + logging.info("dut_data after config applied: " + str(data)) + yield data -@pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtures_ver, reset_scenario_lf, - instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, run_lf, - get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info, cc_1): - param = dict(request.param) - - # VLAN Setup - if request.param["mode"] == "VLAN": - - vlan_list = list() - refactored_vlan_list = list() - ssid_modes = request.param["ssid_modes"].keys() - for mode in ssid_modes: - for ssid in range(len(request.param["ssid_modes"][mode])): - if "vlan" in request.param["ssid_modes"][mode][ssid]: - vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) - else: - pass - if vlan_list: - [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] - vlan_list = refactored_vlan_list - for i in range(len(vlan_list)): - if vlan_list[i] > 4095 or vlan_list[i] < 1: - vlan_list.pop(i) - if request.param["mode"] == "VLAN": - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan_list) - - # call this, if 1.x - print("fixture version ", fixtures_ver) - if cc_1: - return_var = fixtures_ver.setup_profiles(request, param, run_lf, instantiate_profile, get_configuration, get_markers, lf_tools) - else: - return_var = fixtures_ver.setup_profiles(request, param, setup_controller, testbed, get_equipment_ref, - instantiate_profile, - get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, - radius_accounting_info, run_lf=run_lf) - - yield return_var - - -@pytest.fixture(scope="session") -def station_names_twog(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def station_names_fiveg(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def station_names_ax(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["AX-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def num_stations(request): - num_sta = int(request.config.getini("num_stations")) - yield num_sta - - -@pytest.fixture(scope="class") -def get_vif_state(get_apnos, get_configuration, request, lf_tools, run_lf): - if request.config.getoption("1.x"): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - yield vif_state - else: - yield lf_tools.ssid_list - - -@pytest.fixture(scope="session") -def dfs_start(fixtures_ver, get_apnos, get_configuration): - dfs_start = fixtures_ver.dfs(get_apnos, get_configuration) - yield dfs_start - - -@pytest.fixture(scope="class") -def get_vlan_list(get_apnos, get_configuration): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") - vlan_list = list(ap_ssh.get_vlan()) - vlan_list.sort() - yield vlan_list - - -@pytest.fixture(scope="session") -def reset_scenario_lf(request, lf_tools, run_lf): - if not run_lf: - lf_tools.reset_scenario() - def teardown_session(): - lf_tools.reset_scenario() - - request.addfinalizer(teardown_session) - yield "" - diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py index 787c86e2b..4092baf8e 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py @@ -5,7 +5,7 @@ import time import pandas as pd pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dfs_tests_lf, + pytest.mark.dfs_tests, pytest.mark.bandwidth_20MHz] setup_params_general1 = { @@ -30,70 +30,37 @@ setup_params_general1 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-52") +@pytest.mark.usefixtures("setup_configuration") class TestDFSChannel52Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6472", name="WIFI-6472") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_52_bw_20 - def test_dfs_channel_52_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 52 and bandwidth 20") + def test_dfs_channel_52_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, + num_stations, check_connectivity, setup_configuration): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general2 = { @@ -118,70 +85,36 @@ setup_params_general2 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-100") class TestDFSChannel100Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6473", name="WIFI-6473") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_100_bw_20 - def test_dfs_channel_100_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 100 and bandwidth 20") + def test_dfs_channel_100_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general3 = { @@ -206,19 +139,25 @@ setup_params_general3 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-104") class TestDFSChannel104Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6474", name="WIFI-6474") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_104_bw_20 - def test_dfs_channel_104_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 104 and bandwidth 20") + def test_dfs_channel_104_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] @@ -226,50 +165,11 @@ class TestDFSChannel104Bw20(object): security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general4 = { @@ -294,63 +194,36 @@ setup_params_general4 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-56") class TestDFSChannel56Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6475", name="WIFI-6475") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_56_bw_20 - def test_dfs_channel_56_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 56 and bandwidth 20") + def test_dfs_channel_56_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general4["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - time.sleep(1) - if not dfs_fail: - assert False setup_params_general5 = { @@ -375,70 +248,36 @@ setup_params_general5 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-60") class TestDFSChannel60Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6476", name="WIFI-6476") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_60_bw_20 - def test_dfs_channel_60_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 60 and bandwidth 20") + def test_dfs_channel_60_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general5["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general6 = { @@ -463,63 +302,36 @@ setup_params_general6 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-64") class TestDFSChannel64Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6477", name="WIFI-6477") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_64_bw_20 - def test_dfs_channel_64_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 64 and bandwidth 20") + def test_dfs_channel_64_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general6["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - time.sleep(1) - if not dfs_fail: - assert False setup_params_general7 = { @@ -544,70 +356,36 @@ setup_params_general7 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-108") class TestDFSChannel108Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6478", name="WIFI-6478") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_108_bw_20 - def test_dfs_channel_108_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 108 and bandwidth 20") + def test_dfs_channel_108_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general7["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general8 = { @@ -632,146 +410,38 @@ setup_params_general8 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-112") class TestDFSChannel112Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6479", name="WIFI-6479") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_112_bw_20 - def test_dfs_channel_112_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 112 and bandwidth 20") + def test_dfs_channel_112_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general8["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False -# setup_params_general9 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 124, -# "channel_bandwidth": 20 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general9], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel124Bw20(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6480", name="WIFI-6480") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_124_bw_20 -# def test_dfs_channel_124_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general9["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { @@ -794,70 +464,36 @@ setup_params_general10 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-132") class TestDFSChannel132Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6481", name="WIFI-6481") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_132_bw_20 - def test_dfs_channel_132_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 132 and bandwidth 20") + def test_dfs_channel_132_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general10["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general11 = { @@ -882,70 +518,36 @@ setup_params_general11 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-136") class TestDFSChannel136Bw20(object): + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6482", name="WIFI-6482") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_136_bw_20 - def test_dfs_channel_136_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 136 and bandwidth 20") + def test_dfs_channel_136_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general12 = { @@ -970,70 +572,35 @@ setup_params_general12 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-140") class TestDFSChannel140Bw20(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6483", name="WIFI-6483") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_140_bw_20 - def test_dfs_channel_140_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 140 and bandwidth 20") + def test_dfs_channel_140_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general12["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general13 = { @@ -1058,67 +625,32 @@ setup_params_general13 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("Channel-144") class TestDFSChannel144Bw20(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6484", name="WIFI-6484") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_144_bw_20 - def test_dfs_channel_144_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 144 and bandwidth 20") + def test_dfs_channel_144_bw_20(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general13["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py index 64428bc08..6dc4a5bb1 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py @@ -5,7 +5,7 @@ import time import pandas as pd pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dfs_tests_lf, + pytest.mark.dfs_tests, pytest.mark.bandwidth_40MHz] setup_params_general1 = { @@ -27,72 +27,39 @@ setup_params_general1 = { }, "radius": False } + + @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("Channel-52") class TestDFSChannel52Bw40(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6209", name="WIFI-6209") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_52_bw_40 - def test_dfs_channel_52_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 52 and bandwidth 40") + def test_dfs_channel_52_bw_40(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False + setup_params_general2 = { "mode": "BRIDGE", @@ -113,220 +80,40 @@ setup_params_general2 = { }, "radius": False } + + @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("Channel-100") class TestDFSChannel100Bw40(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6310", name="WIFI-6310") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_100_bw_40 - def test_dfs_channel_100_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 100 and bandwidth 40") + def test_dfs_channel_100_bw_40(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False -# setup_params_general3 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 104, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general3], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel104Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6312", name="WIFI-6312") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_104_bw_40 -# def test_dfs_channel_104_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general3["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - -# setup_params_general4 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 56, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general4], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel56Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6314", name="WIFI-6314") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_56_bw_40 -# def test_dfs_channel_56_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general4["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False setup_params_general5 = { "mode": "BRIDGE", @@ -347,146 +134,39 @@ setup_params_general5 = { }, "radius": False } + + @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("Channel-60") class TestDFSChannel60Bw40(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6315", name="WIFI-6315") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_60_bw_40 - def test_dfs_channel_60_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 60 and bandwidth 40") + def test_dfs_channel_60_bw_40(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general5["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False -# setup_params_general6 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 64, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general6], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel64Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6316", name="WIFI-6316") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_64_bw_40 -# def test_dfs_channel_64_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general6["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False setup_params_general7 = { "mode": "BRIDGE", @@ -507,294 +187,39 @@ setup_params_general7 = { }, "radius": False } + + @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("Channel-108") class TestDFSChannel108Bw40(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6317", name="WIFI-6317") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_108_bw_40 - def test_dfs_channel_108_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 108 and bandwidth 40") + def test_dfs_channel_108_bw_40(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general7["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False -# setup_params_general8 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 120, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general8], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel120Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6318", name="WIFI-6318") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_120_bw_40 -# def test_dfs_channel_120_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general8["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - -# setup_params_general9 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 124, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general9], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel124Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6319", name="WIFI-6319") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_124_bw_40 -# def test_dfs_channel_124_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general9["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - -# setup_params_general10 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 128, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general10], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel128Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6320", name="WIFI-6320") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_128_bw_40 -# def test_dfs_channel_128_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general10["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False setup_params_general11 = { "mode": "BRIDGE", @@ -816,217 +241,35 @@ setup_params_general11 = { }, "radius": False } + + @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("Channel-132") class TestDFSChannel132Bw40(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6321", name="WIFI-6321") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_132_bw_40 - def test_dfs_channel_132_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): - lf_tools.reset_scenario() + @allure.title("Test for Channel 132 and bandwidth 40") + def test_dfs_channel_132_bw_40(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False - -# setup_params_general12 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 140, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general12], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel140Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6321", name="WIFI-6321") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_140_bw_40 -# def test_dfs_channel_140_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general12["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - -# setup_params_general13 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 144, -# "channel_bandwidth": 40 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general13], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel144Bw40(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6322", name="WIFI-6322") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_144_bw_40 -# def test_dfs_channel_144_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general13["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False \ No newline at end of file diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py index 876a88bb5..5ec675e16 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py @@ -6,7 +6,7 @@ import pandas as pd pytestmark = [pytest.mark.ow_regression_lf, pytest.mark.ow_sanity_lf, - pytest.mark.ow_dfs_tests_lf, + pytest.mark.dfs_tests, pytest.mark.bandwidth_80MHz] setup_params_general1 = { @@ -31,70 +31,39 @@ setup_params_general1 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("Channel-52") class TestDFSChannel52Bw80(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6376", name="WIFI-6376") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_52_bw_80 - def test_dfs_channel_52_bw_80(self, get_ap_logs, lf_test, lf_tools, station_names_fiveg, dfs_start, get_lf_logs): - lf_tools.reset_scenario() + @allure.title("Verify DFS Test of Channel 52 and Bandwidth 80MHz in 5GHz Band") + def test_dfs_channel_52_bw_80(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): + """ + To verify that a 5G client operating on channel 52 shifts to a non-DFS channel if radar is detected + Unique Marker: pytest -m "bandwidth_80MHz and ow_sanity_lf and dfs_channel_52_bw_80" + """ profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False setup_params_general2 = { @@ -119,664 +88,41 @@ setup_params_general2 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("Channel-100") class TestDFSChannel100Bw80(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6311", name="WIFI-6311") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_100_bw_80 - def test_dfs_channel_100_bw_80(self, get_ap_logs, lf_test, lf_tools, station_names_fiveg, dfs_start, get_lf_logs): - lf_tools.reset_scenario() + @allure.title("Verify DFS Test of Channel 100 and Bandwidth 80MHz in 5GHz Band") + def test_dfs_channel_100_bw_80(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): + """ + To verify that a 5G client operating on channel 100 shifts to a non-DFS channel if radar is detected + Unique Marker: pytest -m "bandwidth_80MHz and ow_sanity_lf and dfs_channel_100_bw_80" + """ profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False -# setup_params_general3 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 104, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general3], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel104Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6313", name="WIFI-6313") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_104_bw_80 -# def test_dfs_channel_104_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general3["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general4 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 56, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general4], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel56Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6377", name="WIFI-6377") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_56_bw_80 -# def test_dfs_channel_56_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general4["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general5 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 60, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general5], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel60Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6378", name="WIFI-6378") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_60_bw_80 -# def test_dfs_channel_60_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general5["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general6 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 64, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general6], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel64Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6379", name="WIFI-6379") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_64_bw_80 -# def test_dfs_channel_64_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general6["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general7 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 108, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general7], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel108Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6380", name="WIFI-6380") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_108_bw_80 -# def test_dfs_channel_108_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general7["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general8 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 120, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general8], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel120Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6381", name="WIFI-6381") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_120_bw_80 -# def test_dfs_channel_120_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general8["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general9 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 124, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general9], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel124Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6382", name="WIFI-6382") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_124_bw_80 -# def test_dfs_channel_124_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general9["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general10 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 128, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general10], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel128Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6383", name="WIFI-6383") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_128_bw_80 -# def test_dfs_channel_128_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general10["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False - setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { @@ -799,215 +145,37 @@ setup_params_general11 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") +@allure.feature("DFS Test") +@allure.parent_suite("DFS Test") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("Channel-132") class TestDFSChannel132Bw80(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6384", name="WIFI-6384") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dfs_channel_132_bw_80 - def test_dfs_channel_132_bw_80(self, get_ap_logs, lf_test, lf_tools, station_names_fiveg, dfs_start, get_lf_logs): - lf_tools.reset_scenario() + @allure.title("Verify DFS Test of Channel 132 and Bandwidth 80MHz in 5GHz Band") + def test_dfs_channel_132_bw_80(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, check_connectivity, get_target_object): + """ + To verify that a 5G client operating on channel 132 shifts to a non-DFS channel if radar is detected + Unique Marker: pytest -m "bandwidth_80MHz and ow_sanity_lf and dfs_channel_132_bw_80" + + """ profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" - vlan = 1 - dfs_fail = True - print("station_names_fiveg :", station_names_fiveg) - 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) - print("station", station) - channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - print("channel before dfs: ", channel1) - if channel1 == str(channel): - dfs_start.dfs() - time.sleep(15) - else: - print("Station not connected to applied channel") - allure.attach(name="log Data", body="Station not connected to applied channel") - assert False - channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") - log = dfs_start.dfs_logread() - if channel1 != channel2: - print(log) - print("channel after dfs: ", channel2) - allure.attach(name="log Data", body=log) - else: - print(log) - print("dfs not happened") - allure.attach(name="log Data", body=log) - dfs_fail = False - dfs_start.reboot() + get_test_library.dfs_test(ssid=ssid_name, security=security, + passkey=security_key, mode=mode, band=band, + num_sta=1, dut_data=setup_configuration, tip_2x_obj=get_target_object) + get_target_object.reboot() time.sleep(200) - count = 0 - while True: - connected, latest, active = dfs_start.get_ucentral_status() - if connected is True: - print("status is connected after reboot: ", connected) - break - else: - count = count + 1 - if count > 5: - break - time.sleep(5) - if count > 5: - assert False, "AP is disconnected" - if not dfs_fail: - assert False - -# setup_params_general12 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 140, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general12], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel140Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6385", name="WIFI-6385") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_140_bw_80 -# def test_dfs_channel_140_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general12["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False -# -# setup_params_general13 = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} -# ] -# }, -# "dfs": { -# "channel": 144, -# "channel_bandwidth": 80 -# }, -# "rf": {}, -# "radius": False -# } -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_general13], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# -# class TestDFSChannel144Bw80(object): -# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6386", name="WIFI-6386") -# @pytest.mark.wpa2_personal -# @pytest.mark.fiveg -# @pytest.mark.dfs_channel_144_bw_80 -# def test_dfs_channel_144_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start): -# lf_tools.reset_scenario() -# profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] -# ssid_name = profile_data["ssid_name"] -# security_key = profile_data["security_key"] -# channel = setup_params_general13["dfs"]["channel"] -# security = "wpa2" -# band = "fiveg" -# mode = "BRIDGE" -# vlan = 1 -# dfs_fail = True -# print("station_names_fiveg :", station_names_fiveg) -# 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) -# print("station", station) -# channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# print("channel before dfs: ", channel1) -# if channel1 == str(channel): -# dfs_start.dfs() -# time.sleep(15) -# else: -# print("Station not connected to applied channel") -# allure.attach(name="log Data", body="Station not connected to applied channel") -# assert False -# channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel") -# log = dfs_start.dfs_logread() -# if channel1 != channel2: -# print(log) -# print("channel after dfs: ", channel2) -# allure.attach(name="log Data", body=log) -# else: -# print(log) -# print("dfs not happened") -# allure.attach(name="log Data", body=log) -# dfs_fail = False -# dfs_start.reboot() -# time.sleep(200) -# while True: -# connected, latest, active = dfs_start.get_ucentral_status() -# if connected is True: -# print("status is connected after reboot: ", connected) -# break -# time.sleep(1) -# if not dfs_fail: -# assert False diff --git a/tests/e2e/basic/endurance_test/bridge_mode/test_ap_stability.py b/tests/e2e/basic/endurance_test/bridge_mode/test_ap_stability.py index 001c7d725..1ad2f5c66 100644 --- a/tests/e2e/basic/endurance_test/bridge_mode/test_ap_stability.py +++ b/tests/e2e/basic/endurance_test/bridge_mode/test_ap_stability.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestAPStabilityBridge(object): """ pytest -m "regression and bridge and wpa2_personal and twog and fiveg" diff --git a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_bridge_mode.py index 25576fc47..a66c55504 100644 --- a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_bridge_mode.py @@ -24,12 +24,12 @@ setup_params_general_5G = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_5G], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.fiveg_band @@ -40,7 +40,7 @@ class TestWifiCapacityBRIDGEModeAX5G(object): """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") @pytest.mark.tcp_download - def test_client_wpa2_BRIDGE_tcp_dl(self, lf_tools, setup_profiles, + def test_client_wpa2_BRIDGE_tcp_dl(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test BRIDGE mode @@ -136,7 +136,7 @@ class TestWifiCapacityBRIDGEModeAX5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") @pytest.mark.tcp_upload - def test_client_wpa2_BRIDGE_tcp_ul(self, lf_tools, setup_profiles, + def test_client_wpa2_BRIDGE_tcp_ul(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test BRIDGE mode diff --git a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_nat_mode.py index 3e9eade9f..d3be0a345 100644 --- a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_nat_mode.py @@ -23,12 +23,12 @@ setup_params_general_5G = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_5G], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.fiveg_band @@ -39,7 +39,7 @@ class TestWifiCapacityNATModeAX5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6947", name="WIFI-6947") @pytest.mark.tcp_download - def test_client_wpa2_NAT_tcp_dl(self, lf_tools, setup_profiles, + def test_client_wpa2_NAT_tcp_dl(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test NAT mode @@ -135,7 +135,7 @@ class TestWifiCapacityNATModeAX5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6948", name="WIFI-6948") @pytest.mark.tcp_upload - def test_client_wpa2_NAT_tcp_ul(self, lf_tools, setup_profiles, + def test_client_wpa2_NAT_tcp_ul(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test NAT mode diff --git a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_vlan_mode.py index e6cd1aaf9..0543e593a 100644 --- a/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/AX_capacity/wpa2_personal/test_vlan_mode.py @@ -22,12 +22,12 @@ setup_params_general_5G = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_5G], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.fiveg_band @@ -38,7 +38,7 @@ class TestWifiCapacityVLANModeAX5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6953", name="WIFI-6953") @pytest.mark.tcp_download - def test_client_wpa2_VLAN_tcp_dl(self, lf_tools, setup_profiles, + def test_client_wpa2_VLAN_tcp_dl(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test VLAN mode @@ -134,7 +134,7 @@ class TestWifiCapacityVLANModeAX5G(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6954", name="WIFI-6954") @pytest.mark.tcp_upload - def test_client_wpa2_VLAN_tcp_ul(self, lf_tools, setup_profiles, + def test_client_wpa2_VLAN_tcp_ul(self, lf_tools, setup_configuration, lf_test, station_names_twog, create_lanforge_chamberview_dut, get_configuration): """ Wifi Capacity Test VLAN mode diff --git a/tests/e2e/interOp/Express_WiFi/iOS/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/__init__.py similarity index 100% rename from tests/e2e/interOp/Express_WiFi/iOS/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/__init__.py diff --git a/tests/e2e/interOp/captive_portal/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/open/__init__.py similarity index 100% rename from tests/e2e/interOp/captive_portal/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/open/__init__.py diff --git a/tests/e2e/basic/performance_tests/client_scale_test/open/test_bridge_mode.py b/tests/e2e/basic/performance_tests/client_scale_test/open/test_bridge_mode.py new file mode 100644 index 000000000..7658b6d90 --- /dev/null +++ b/tests/e2e/basic/performance_tests/client_scale_test/open/test_bridge_mode.py @@ -0,0 +1,309 @@ +""" + + Performance Test: Client Scale Test : BRIDGE Mode + pytest -m "client_scale_test and BRIDGE" + +""" +import logging +import allure +import pytest + +pytestmark = [pytest.mark.bridge, pytest.mark.client_scale_tests] + +setup_params_general_2G = { + "mode": "BRIDGE", + "ssid_modes": { + "open": [ + {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="Open Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.open +@pytest.mark.twog +@pytest.mark.twog_band +class TestWifiCapacityBRIDGEMode2G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3648", name="WIFI-3648") + @pytest.mark.open + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 2.4 GHz") + def test_client_open_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and tcp_download" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3654", name="WIFI-3654") + @pytest.mark.open + @pytest.mark.udp_download + @allure.title("Test for UDP Download 2.4 GHz") + def test_client_open_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and udp_download" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3670", name="WIFI-3670") + @pytest.mark.open + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 2.4 GHz") + def test_client_open_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3664", name="WIFI-3664") + @pytest.mark.open + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 2.4 GHz") + def test_client_open_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.open + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 2.4 GHz") + def test_client_open_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.open + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 2.4 GHz") + def test_client_open_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and twog and udp_upload" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + +setup_params_general_5G = { + "mode": "BRIDGE", + "ssid_modes": { + "open": [ + {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="Open Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.open_personal +@pytest.mark.fiveg +@pytest.mark.fiveg_band +class TestWifiCapacityBRIDGEMode5G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3649", name="WIFI-3649") + @pytest.mark.open + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 5 GHz") + def test_client_open_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3655", name="WIFI-3655") + @pytest.mark.open + @pytest.mark.udp_download + @allure.title("Test for UDP Download 5 GHz") + def test_client_open_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and udp_download" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3671", name="WIFI-3671") + @pytest.mark.open + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 5 GHz") + def test_client_open_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3665", name="WIFI-3665") + @pytest.mark.open + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 5 GHz") + def test_client_open_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.udp_upload + @pytest.mark.open + @allure.title("Test for UDP Upload 5 GHz") + def test_client_open_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.tcp_upload + @pytest.mark.open + @allure.title("Test for TCP Upload 5 GHz") + def test_client_open_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and open and fiveg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True diff --git a/tests/e2e/interOp/captive_portal/nat_mode/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/open/test_nat_mode.py similarity index 100% rename from tests/e2e/interOp/captive_portal/nat_mode/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/open/test_nat_mode.py diff --git a/tests/e2e/interOp/captive_portal/nat_mode/android/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/__init__.py similarity index 100% rename from tests/e2e/interOp/captive_portal/nat_mode/android/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/__init__.py diff --git a/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_bridge_mode.py new file mode 100644 index 000000000..4a8fd0a14 --- /dev/null +++ b/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_bridge_mode.py @@ -0,0 +1,311 @@ +""" + + Performance Test: Client Scale Test : BRIDGE Mode + pytest -m "client_scale_test and BRIDGE" + +""" +import logging +import allure +import pytest + +pytestmark = [pytest.mark.performance, pytest.mark.bridge, pytest.mark.client_scale_tests] + +setup_params_general_2G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa2_personal +@pytest.mark.twog +@pytest.mark.twog_band +class TestWifiCapacityBRIDGEMode2G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3928", name="WIFI-3928") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 2.4 GHz") + def test_client_wpa2_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3930", name="WIFI-3930") + @pytest.mark.wpa2_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 2.4 GHz") + def test_client_wpa2_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3934", name="WIFI-3934") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 2.4 GHz") + def test_client_wpa2_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3935", name="WIFI-3935") + @pytest.mark.wpa2_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 2.4 GHz") + def test_client_wpa2_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 2.4 GHz") + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") + @pytest.mark.wpa2_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 2.4 GHz") + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and twog and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + +setup_params_general_5G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa2_personal +@pytest.mark.fiveg +@pytest.mark.fiveg_band +class TestWifiCapacityBRIDGEMode5G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3929", name="WIFI-3929") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 5 GHz") + def test_client_wpa2_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3931", name="WIFI-3931") + @pytest.mark.wpa2_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 5 GHz") + def test_client_wpa2_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3936", name="WIFI-3936") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 5 GHz") + def test_client_wpa2_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3937", name="WIFI-3937") + @pytest.mark.wpa2_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 5 GHz") + def test_client_wpa2_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.udp_upload + @pytest.mark.wpa2_personal + @allure.title("Test for UDP Upload 5 GHz") + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.tcp_upload + @pytest.mark.wpa2_personal + @allure.title("Test for TCP Upload 5 GHz") + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa2_personal and fiveg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True diff --git a/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_nat_mode.py new file mode 100644 index 000000000..5a92c4652 --- /dev/null +++ b/tests/e2e/basic/performance_tests/client_scale_test/wpa2_personal/test_nat_mode.py @@ -0,0 +1,311 @@ +""" + + Performance Test: Client Scale Test : NAT Mode + pytest -m "client_scale_test and nat" + +""" +import logging +import allure +import pytest + +pytestmark = [pytest.mark.performance, pytest.mark.nat, pytest.mark.client_scale_tests] + +setup_params_general_2G = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="NAT Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa2_personal +@pytest.mark.twog +@pytest.mark.twog_band +class TestWifiCapacityNATMode2G(object): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3928", name="WIFI-3928") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 2.4 GHz") + def test_client_wpa2_NAT_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3930", name="WIFI-3930") + @pytest.mark.wpa2_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 2.4 GHz") + def test_client_wpa2_NAT_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3934", name="WIFI-3934") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 2.4 GHz") + def test_client_wpa2_NAT_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3935", name="WIFI-3935") + @pytest.mark.wpa2_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 2.4 GHz") + def test_client_wpa2_NAT_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 2.4 GHz") + def test_client_wpa2_NAT_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") + @pytest.mark.wpa2_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 2.4 GHz") + def test_client_wpa2_NAT_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and twog and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + +setup_params_general_5G = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="NAT Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa2_personal +@pytest.mark.fiveg +@pytest.mark.fiveg_band +class TestWifiCapacityNATMode5G(object): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3929", name="WIFI-3929") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 5 GHz") + def test_client_wpa2_NAT_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3931", name="WIFI-3931") + @pytest.mark.wpa2_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 5 GHz") + def test_client_wpa2_NAT_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3936", name="WIFI-3936") + @pytest.mark.wpa2_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 5 GHz") + def test_client_wpa2_NAT_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3937", name="WIFI-3937") + @pytest.mark.wpa2_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 5 GHz") + def test_client_wpa2_NAT_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.udp_upload + @pytest.mark.wpa2_personal + @allure.title("Test for UDP Upload 5 GHz") + def test_client_wpa2_NAT_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.tcp_upload + @pytest.mark.wpa2_personal + @allure.title("Test for TCP Upload 5 GHz") + def test_client_wpa2_NAT_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test NAT mode + pytest -m "client_scale_tests and nat and wpa2_personal and fiveg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT-WAN" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True diff --git a/tests/e2e/interOp/captive_portal/nat_mode/ios/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/__init__.py similarity index 100% rename from tests/e2e/interOp/captive_portal/nat_mode/ios/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/__init__.py diff --git a/tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/test_bridge_mode.py new file mode 100644 index 000000000..6789ba4e7 --- /dev/null +++ b/tests/e2e/basic/performance_tests/client_scale_test/wpa3_personal/test_bridge_mode.py @@ -0,0 +1,449 @@ +""" + + Performance Test: Client Scale Test : BRIDGE Mode + pytest -m "client_scale_tests and bridge" + +""" +import os +import pytest +import allure + +pytestmark = [pytest.mark.bridge, pytest.mark.client_scale_tests] + +setup_params_general_2G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa3_personal +@pytest.mark.twog +@pytest.mark.twog_band +class TestWifiCapacityBRIDGEMode2G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3651", name="WIFI-3651") + @pytest.mark.wpa3_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 2.4 GHz") + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 2.4 GHz") + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 2.4 GHz") + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3658", name="WIFI-3658") + @pytest.mark.wpa3_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 2.4 GHz") + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3668", name="WIFI-3668") + @pytest.mark.wpa3_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 2.4 GHz") + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3662", name="WIFI-3662") + @pytest.mark.wpa3_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 2.4 GHz") + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and twog and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + +setup_params_general_5G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa3_personal +@pytest.mark.fiveg +@pytest.mark.fiveg_band +class TestWifiCapacityBRIDGEMode5G(object): + """ Client Scale Test BRIDGE mode + client_scale_tests and bridge and wpa3_personal and fiveg" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3653", name="WIFI-3653") + @pytest.mark.wpa3_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 5 GHz") + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659") + @pytest.mark.wpa3_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 5 GHz") + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669") + @pytest.mark.wpa3_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 5 GHz") + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663") + @pytest.mark.wpa3_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 5 GHz") + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 5 GHz") + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 5 GHz") + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and fiveg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + +setup_params_general_6G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_6G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa3_personal +@pytest.mark.sixg +@pytest.mark.sixg_band +@pytest.mark.performance +class TestWifiCapacityBRIDGEMode6G(object): + """ Client Scale Test BRIDGE mode + client_scale_tests and bridge and wpa3_personal and sixg" + """ + + @pytest.mark.wpa3_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 6 GHz") + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + + # @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659") + @pytest.mark.wpa3_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 6 GHz") + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + + # @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669") + @pytest.mark.wpa3_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 6 GHz") + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + + # @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663") + @pytest.mark.wpa3_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 6 GHz") + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 6 GHz") + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + + @pytest.mark.wpa3_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 6 GHz") + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa3_personal and sixg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"6G": max_stations}) + assert True + diff --git a/tests/e2e/interOp/openroaming_test/android/__init__.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/__init__.py similarity index 100% rename from tests/e2e/interOp/openroaming_test/android/__init__.py rename to tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/__init__.py diff --git a/tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/test_bridge_mode.py new file mode 100644 index 000000000..ce9cf9167 --- /dev/null +++ b/tests/e2e/basic/performance_tests/client_scale_test/wpa_personal/test_bridge_mode.py @@ -0,0 +1,309 @@ +""" + + Performance Test: Client Scale Test : BRIDGE Mode + pytest -m "client_scale_test and BRIDGE" + +""" +import logging +import allure +import pytest + +pytestmark = [pytest.mark.bridge, pytest.mark.client_scale_tests] + +setup_params_general_2G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_personal": [ + {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="WPA Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa_personal +@pytest.mark.twog +@pytest.mark.twog_band +class TestWifiCapacityBRIDGEMode2G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3650", name="WIFI-3650") + @pytest.mark.wpa_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 2.4 GHz") + def test_client_wpa_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3656", name="WIFI-3656") + @pytest.mark.wpa_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 2.4 GHz") + def test_client_wpa_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3666", name="WIFI-3666") + @pytest.mark.wpa_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 2.4 GHz") + def test_client_wpa_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3660", name="WIFI-3660") + @pytest.mark.wpa_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 2.4 GHz") + def test_client_wpa_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.wpa_personal + @pytest.mark.tcp_upload + @allure.title("Test for TCP Upload 2.4 GHz") + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + @pytest.mark.wpa_personal + @pytest.mark.udp_upload + @allure.title("Test for UDP Upload 2.4 GHz") + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and twog and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": max_stations}) + assert True + + +setup_params_general_5G = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_personal": [ + {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ] + }, + "rf": {}, + "radius": False +} + + +@allure.feature("Client Scale Tests") +@allure.parent_suite("Client Scale Tests") +@allure.suite(suite_name="wpa Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5G], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa_personal +@pytest.mark.fiveg +@pytest.mark.fiveg_band +class TestWifiCapacityBRIDGEMode5G(object): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3652", name="WIFI-3652") + @pytest.mark.wpa_personal + @pytest.mark.tcp_download + @allure.title("Test for TCP Download 5 GHz") + def test_client_wpa_BRIDGE_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and tcp_download" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3657", name="WIFI-3657") + @pytest.mark.wpa_personal + @pytest.mark.udp_download + @allure.title("Test for UDP Download 5 GHz") + def test_client_wpa_BRIDGE_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and udp_download" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_dl", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3667", name="WIFI-3667") + @pytest.mark.wpa_personal + @pytest.mark.tcp_bidirectional + @allure.title("Test for TCP Bidirectional 5 GHz") + def test_client_wpa_BRIDGE_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and tcp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3661", name="WIFI-3661") + @pytest.mark.wpa_personal + @pytest.mark.udp_bidirectional + @allure.title("Test for UDP Bidirectional 5 GHz") + def test_client_wpa_BRIDGE_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and udp_bidirectional" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_bi", mode=mode, + download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.udp_upload + @pytest.mark.wpa_personal + @allure.title("Test for UDP Upload 5 GHz") + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and udp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True + + @pytest.mark.tcp_upload + @pytest.mark.wpa_personal + @allure.title("Test for TCP Upload 5 GHz") + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + max_stations): + """ Client Scale Test BRIDGE mode + pytest -m "client_scale_tests and bridge and wpa_personal and fiveg and tcp_upload" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_ul", mode=mode, + download_rate="100Kbps", batch_size="1,5,10,20,40,64,128,256", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": max_stations}) + assert True diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_bridge_mode.py index 486e22aab..be0ddb2ff 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_bridge_mode.py @@ -1,104 +1,89 @@ """ Performance Test: Dataplane Throughput Test: BRIDGE Mode - pytest -m "dataplane_throughput_test open security and bridge" + pytest -m "dataplane_tests open security and bridge" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, - pytest.mark.bridge] # , pytest.mark.usefixtures("setup_test_run")] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.bridge, pytest.mark.open] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "open": [ - {"ssid_name": "open", "appliedRadios": ["2G"]}, - {"ssid_name": "open", "appliedRadios": ["5G"]}]}, + {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE open security and Dataplane Throughput Test") + +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="Open Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputBRIDGE(object): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and open and BRIDGE" + pytest -m "dataplane_tests and open and bridge" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673",name="WIFI-3673") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.open @pytest.mark.twog - def test_tcp_upd_open_bridge_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for TCP UDP 2.4 GHz") + def test_tcp_upd_open_bridge_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput BRIDGE Mode. - pytest -m "dataplane_throughput_test and BRIDGE and open and twog" + pytest -m "dataplane_tests and bridge and open and twog" """ - profile_data = setup_params_general["ssid_modes"]["open"][0] + profile_data = {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} 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_DPT_DPT_OPEN_2G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False + influx_tags = "dataplane-tcp-udp-bridge-open-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_OPEN_2G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.open @pytest.mark.fiveg - def test_tcp_upd_open_bridge_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP 5 GHz") + def test_tcp_upd_open_bridge_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and open and fiveg" + pytest -m "dataplane_tests and bridge and open and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + profile_data = {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} 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_DPT_DPT_OPEN_5G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + influx_tags = "dataplane-tcp-udp-bridge-open-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_OPEN_5G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_nat_mode.py index f4dc438db..e8d8b6a53 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_nat_mode.py @@ -1,106 +1,89 @@ """ - Performance Test: Dataplane Throughput Test open secutrity: nat Mode. - pytest -m "dataplane_throughput_test and nat and open" + Performance Test: Dataplane Throughput Test: NAT Mode + pytest -m "dataplane_tests open security and nat" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, - pytest.mark.nat] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.nat, pytest.mark.open] setup_params_general = { "mode": "NAT", "ssid_modes": { "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}]}, + {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("NAT MODE Dataplane Throughput Test") -@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="Open Security") +@allure.sub_suite(sub_suite_name="NAT Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputNAT(object): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat" + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and open and nat" """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.open @pytest.mark.twog - def test_tcp_upd_open_nat_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and open and twog" + @allure.title("Test for TCP UDP 2.4 GHz") + def test_tcp_upd_open_nat_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode. + pytest -m "dataplane_tests and nat and open and twog" """ - profile_data = setup_params_general["ssid_modes"]["open"][0] + profile_data = {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "open" - mode = "NAT" + mode = "NAT-WAN" 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_DPT_DPT_OPEN_2G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False + influx_tags = "dataplane-tcp-udp-nat-open-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_OPEN_2G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.open @pytest.mark.fiveg - def test_tcp_upd_open_nat_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and open and fiveg" + @allure.title("Test for TCP UDP 5 GHz") + def test_tcp_upd_open_nat_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and nat and open and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + profile_data = {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "open" - mode = "NAT" + mode = "NAT-WAN" 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_DPT_DPT_OPEN_5G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + influx_tags = "dataplane-tcp-udp-nat-open-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_OPEN_5G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_vlan_mode.py index 6cc32ba11..0f0c4659a 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/open_security/test_vlan_mode.py @@ -1,105 +1,90 @@ """ Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and vlan" + pytest -m "dataplane_tests and vlan" """ import os import pytest import allure -pytestmark = [pytest.mark.vlan, pytest.mark.dataplane_throughput_test] +pytestmark = [pytest.mark.vlan, pytest.mark.dataplane_tests, pytest.mark.open] setup_params_general = { "mode": "VLAN", "ssid_modes": { "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}]}, + {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("VLAN MODE open security and Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="Open Security") +@allure.sub_suite(sub_suite_name="VLAN Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputVLAN(object): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and open and VLAN" + pytest -m "dataplane_tests and open and vlan" """ @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.open @pytest.mark.twog - def test_tcp_upd_open_vlan_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for TCP UDP 2.4 GHz") + def test_tcp_upd_open_vlan_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and open and twog" + pytest -m "dataplane_tests and vlan and open and twog" """ - profile_data = setup_params_general["ssid_modes"]["open"][0] + profile_data = {"ssid_name": "open_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "open" mode = "VLAN" band = "twog" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-open-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_OPEN_2G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_OPEN_2G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput OPEN Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") - @pytest.mark.open @pytest.mark.fiveg - def test_tcp_upd_open_vlan_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP 5 GHz") + def test_tcp_upd_open_vlan_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and VLAN and open and fiveg" + pytest -m "dataplane_tests and vlan and open and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + profile_data = {"ssid_name": "open_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "open" mode = "VLAN" band = "fiveg" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-open-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_OPEN_5G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_OPEN_5G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput OPEN Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py index 5ed5c0575..d5da23922 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_bridge_mode.py @@ -1,174 +1,91 @@ """ Performance Test: Dataplane Throughput Test: BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE" + pytest -m "dataplane_tests wpa2_personal security and bridge" """ import os import pytest import allure -pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, - pytest.mark.bridge] # , pytest.mark.usefixtures("setup_test_run")] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.bridge, pytest.mark.wpa2_personal, pytest.mark.performance] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputBRIDGE(object): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE" + pytest -m "dataplane_tests and wpa2_personal and bridge" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa2_personal @pytest.mark.twog - def test_tcp_udp_wpa2_personal_bridge_2g_band_ac_station(self, lf_tools, - lf_test, station_names_twog, - create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa2_personal_bridge_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput BRIDGE Mode. + pytest -m "dataplane_tests and bridge and wpa2_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-bridge-wpa2-2.4G-ac" - 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) + influx_tags = "dataplane-tcp-udp-bridge-wpa2_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, passkey=security_key, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_tools.attach_report_kpi(report_name=report_name) - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_tcp_udp_wpa2_personal_bridge_5g_band_ac_station(self, lf_tools, - lf_test, station_names_fiveg, - create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa2_personal_bridge_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and fiveg" + pytest -m "dataplane_tests and bridge and wpa2_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa2" + security_key = profile_data["security_key"] mode = "BRIDGE" band = "fiveg" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-bridge-wpa2-5G-ac" - 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_DPT_DPT_WPA2_5G_BRIDGE", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - lf_tools.attach_report_kpi(report_name=report_name) - 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 - def test_tcp_udp_wpa2_personal_bridge_5g_band_ax_station(self, lf_tools, - lf_test, station_names_ax, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and fiveg" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "ax" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-bridge-wpa2-5G-ax" - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_ax, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_ax, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE_AX", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_ax) - assert station - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_tcp_udp_wpa2_personal_bridge_2g_band_ax_station(self, lf_tools, - lf_test, station_names_ax, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "BRIDGE" - band = "ax" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-bridge-wpa2-2.4G-ax" - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_ax, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_ax, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE_AX", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_tools.attach_report_kpi(report_name=report_name) - lf_test.Client_disconnect(station_name=station_names_ax) - assert station - else: - assert False + influx_tags = "dataplane-tcp-udp-bridge-wpa2_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, passkey=security_key, security=security, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py index 9e78d494c..70ba87909 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_nat_mode.py @@ -1,173 +1,91 @@ """ - Performance Test: Dataplane Throughput Test: nat Mode - pytest -m "dataplane_throughput_test and nat" + Performance Test: Dataplane Throughput Test: NAT Mode + pytest -m "dataplane_tests wpa2_personal security and nat" """ import os import pytest import allure -pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, - pytest.mark.nat] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.nat, pytest.mark.wpa2_personal, pytest.mark.performance] setup_params_general = { "mode": "NAT", "ssid_modes": { "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") -@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="NAT Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputNAT(object): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat" + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and wpa2_personal and nat" """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa2_personal @pytest.mark.twog - def test_tcp_udp_wpa2_personal_nat_2g_band_ac_station(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa2_personal_nat_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode. + pytest -m "dataplane_tests and nat and wpa2_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa2" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" band = "twog" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-nat-wpa2-2.4G-ac" - 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) + influx_tags = "dataplane-tcp-udp-nat-wpa2_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA2_2G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_NAT", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_tools.attach_report_kpi(report_name=report_name) - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_tcp_udp_wpa2_personal_nat_5g_band_ac_station(self, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg" + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa2_personal_nat_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and nat and wpa2_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa2" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" band = "fiveg" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-nat-wpa2-5G-ac" - 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_DPT_DPT_WPA2_5G_NAT", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - lf_tools.attach_report_kpi(report_name=report_name) - 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.twog - def test_tcp_udp_wpa2_personal_nat_2g_band_ax_station(self, lf_tools, - lf_test, station_names_ax, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "NAT" - band = "ax" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-nat-wpa2-2.4G-ax" - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_ax, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_ax, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_NAT_AX", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_tools.attach_report_kpi(report_name=report_name) - lf_test.Client_disconnect(station_name=station_names_ax) - assert station - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_tcp_udp_wpa2_personal_nat_5g_band_aX_station(self, lf_tools, - lf_test, station_names_ax, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "NAT" - band = "ax" - vlan = 1 - dut_name = create_lanforge_chamberview_dut - influx_tags = "dataplane-tcp-udp-nat-wpa2-5G-ax" - station = lf_test.Client_Connect(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_ax, vlan_id=vlan) - - if station: - dp_obj = lf_test.dataplane(station_name=station_names_ax, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_5G_NAT_AX", - vlan_id=vlan, dut_name=dut_name, influx_tags=influx_tags, move_to_influx=False) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_ax) - assert station - else: - assert False \ No newline at end of file + influx_tags = "dataplane-tcp-udp-nat-wpa2_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA2_5G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py index 9bd687d08..05dc794d2 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa2_security/test_vlan_mode.py @@ -1,109 +1,96 @@ """ Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and vlan" - + pytest -m "dataplane_tests and vlan" """ import os import pytest import allure -pytestmark = [pytest.mark.performance, - pytest.mark.vlan] - +pytestmark = [pytest.mark.vlan, pytest.mark.dataplane_tests, pytest.mark.wpa2_personal] setup_params_general = { "mode": "VLAN", "ssid_modes": { "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("VLAN MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA2 Personal Security") +@allure.sub_suite(sub_suite_name="VLAN Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") - +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputVLAN(object): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan" + pytest -m "dataplane_tests and wpa2_personal and vlan" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa2_personal @pytest.mark.twog - def test_tcp_upd_wpa2_personal_vlan_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa2_personal_vlan_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa2_personal and twog" + pytest -m "dataplane_tests and vlan and wpa2_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "wpa2_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa2" + security_key = profile_data["security_key"] mode = "VLAN" band = "twog" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa2_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA2_2G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA2_2G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3914", name="WIFI-3914") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa2_personal @pytest.mark.fiveg - def test_tcp_upd_wpa2_personal_vlan_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa2_personal_vlan_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa2_personal and fiveg" + pytest -m "dataplane_tests and vlan and wpa2_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "wpa2_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa2" + security_key = profile_data["security_key"] mode = "VLAN" band = "fiveg" - vlan = 100 - 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_DPT_DPT_WPA2_5G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa2_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA2_5G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_bridge_mode.py index 22d8bccd2..037126b0f 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_bridge_mode.py @@ -1,106 +1,119 @@ """ Performance Test: Dataplane Throughput Test: BRIDGE Mode - pytest -m "dataplane_throughput_test and wpa3 and bridge" + pytest -m "dataplane_tests wpa3_personal security and bridge" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, - pytest.mark.bridge] # , pytest.mark.usefixtures("setup_test_run")] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.bridge, pytest.mark.wpa3_personal] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}, + {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something"} + ]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputBRIDGE(object): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and wpa3_personal bridge" + pytest -m "dataplane_tests and wpa3_personal and bridge" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3677", name="WIFI-3677") + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa3_personal @pytest.mark.twog - def test_tcp_upd_wpa3_personal_bridge_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and bridge and wpa3_personal and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_udp_wpa3_personal_bridge_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput BRIDGE Mode. + pytest -m "dataplane_tests and BRIDGE and wpa3_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + profile_data = {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" + security_key = profile_data["security_key"] 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) + influx_tags = "dataplane-tcp-udp-bridge-wpa3_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_2G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_2G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3678", name="WIFI-3678") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_tcp_upd_wpa3_personal_bridge_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_udp_wpa3_personal_bridge_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and bridge and wpa3_personal and fiveg" + pytest -m "dataplane_tests and bridge and wpa3_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + profile_data = {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" + security_key = profile_data["security_key"] 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) + influx_tags = "dataplane-tcp-udp-bridge-wpa3_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_5G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_5G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @pytest.mark.performance + @allure.title("Test for TCP UDP Download 6 GHz") + def test_tcp_udp_wpa3_personal_bridge_6g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput BRIDGE Mode + pytest -m "dataplane_tests and bridge and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + security_key = profile_data["security_key"] + mode = "BRIDGE" + band = "sixg" + influx_tags = "dataplane-tcp-udp-bridge-wpa3_personal-6G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=num_stations, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_6G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_nat_mode.py index 412da64fa..3d0080a2a 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_nat_mode.py @@ -1,104 +1,119 @@ """ - Performance Test: Dataplane Throughput Test: nat Mode - pytest -m "dataplane_throughput_test and and wpa3 nat" + Performance Test: Dataplane Throughput Test: NAT Mode + pytest -m "dataplane_tests wpa3_personal security and nat" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, pytest.mark.nat] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.nat, pytest.mark.wpa3_personal] setup_params_general = { "mode": "NAT", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}, + {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something"} + ]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") -@allure.feature("NAT MODE CLIENT CONNECTIVITY") + + +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="NAT Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputNAT(object): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and wpa3_personal and nat" + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and wpa3_personal and nat" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3677", name="WIFI-3677") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa3_personal @pytest.mark.twog - def test_tcp_upd_wpa3_personal_nat_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa3_personal and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_udp_wpa3_personal_nat_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode. + pytest -m "dataplane_tests and nat and wpa3_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + profile_data = {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" 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) + influx_tags = "dataplane-tcp-udp-nat-wpa3_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_2G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_2G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3678", name="WIFI-3678") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_tcp_upd_wpa3_personal_nat_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa3_personal and fiveg" + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_udp_wpa3_personal_nat_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and nat and wpa3_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + profile_data = {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" 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) + influx_tags = "dataplane-tcp-udp-nat-wpa3_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_5G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_5G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @pytest.mark.performance + @allure.title("Test for TCP UDP Download 6 GHz") + def test_tcp_udp_wpa3_personal_nat_6g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and nat and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + security_key = profile_data["security_key"] + mode = "NAT-WAN" + band = "sixg" + influx_tags = "dataplane-tcp-udp-nat-wpa3_personal-6G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_6G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_vlan_mode.py index d67192012..562731c06 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa3_security/test_vlan_mode.py @@ -1,106 +1,125 @@ """ Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and vlan" + pytest -m "dataplane_tests and vlan" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, pytest.mark.vlan] +pytestmark = [pytest.mark.vlan, pytest.mark.dataplane_tests, pytest.mark.wpa3_personal] setup_params_general = { "mode": "VLAN", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something", "vlan": 100} + ]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("VLAN MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA3 Personal Security") +@allure.sub_suite(sub_suite_name="VLAN Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputVLAN(object): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and wpa3_personal and vlan" + pytest -m "dataplane_tests and wpa3_personal and vlan" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3677", name="WIFI-3677") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa3_personal @pytest.mark.twog - def test_tcp_upd_wpa3_personal_vlan_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_udp_wpa3_personal_vlan_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa3_personal and twog" + pytest -m "dataplane_tests and vlan and wpa3_personal and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + profile_data = {"ssid_name": "wpa3_personal_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" + security_key = profile_data["security_key"] mode = "VLAN" band = "twog" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa3_personal-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_2G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_2G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3678", name="WIFI-3678") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa3_personal @pytest.mark.fiveg - def test_tcp_upd_wpa3_personal_vlan_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_udp_wpa3_personal_vlan_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa3_personal and fiveg" + pytest -m "dataplane_tests and vlan and wpa3_personal and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + profile_data = {"ssid_name": "wpa3_personal_dataplane_5g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa3" + security_key = profile_data["security_key"] mode = "VLAN" band = "fiveg" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa3_personal-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_5G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, - instance_name="TIP_DPT_DPT_WPA3_5G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA3 Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @allure.title("Test for TCP UDP Download 6 GHz") + def test_tcp_udp_wpa3_personal_vlan_6g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput VLAN Mode + pytest -m "dataplane_tests and vlan and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "wpa3_personal_dataplane_6g", "appliedRadios": ["6G"], "security_key": "something", + "vlan": 100} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + security_key = profile_data["security_key"] + mode = "VLAN" + band = "sixg" + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa3_personal-6G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA3_PERSONAL_6G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_bridge_mode.py index 5c9527887..535df1eb0 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_bridge_mode.py @@ -1,106 +1,91 @@ """ Performance Test: Dataplane Throughput Test: BRIDGE Mode - pytest -m "dataplane_throughput_test and bridge and wpa_personal" + pytest -m "dataplane_tests wpa security and bridge" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, - pytest.mark.bridge] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.bridge, pytest.mark.wpa] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "wpa": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("BRIDGE MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA Personal Security") +@allure.sub_suite(sub_suite_name="BRIDGE Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputBRIDGE(object): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and wpa_personal and bridge" + pytest -m "dataplane_tests and wpa and bridge" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3675", name="WIFI-3675") + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa_personal @pytest.mark.twog - def test_tcp_upd_wpa_personal_bridge_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and bridge and wpa and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa_bridge_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput BRIDGE Mode. + pytest -m "dataplane_tests and bridge and wpa and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + profile_data = {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" + security_key = profile_data["security_key"] 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) + influx_tags = "dataplane-tcp-udp-bridge-wpa-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_2G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA_2G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3676", name="WIFI-3676") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa_personal @pytest.mark.fiveg - def test_tcp_upd_wpa_personal_bridge_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa_bridge_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput BRIDGE Mode - pytest -m "dataplane_throughput_test and bridge and wpa_personal and fiveg" + pytest -m "dataplane_tests and bridge and wpa and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + profile_data = {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" + security_key = profile_data["security_key"] 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_DPT_DPT_WPA_5G_BRIDGE", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + influx_tags = "dataplane-tcp-udp-bridge-wpa-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_5G_BRIDGE", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_nat_mode.py index f89ddd97c..a327c89fb 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_nat_mode.py @@ -1,107 +1,91 @@ """ - Performance Test: Dataplane Throughput Test: nat Mode - pytest -m "dataplane_throughput_test and nat" + Performance Test: Dataplane Throughput Test: NAT Mode + pytest -m "dataplane_tests wpa security and nat" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, - pytest.mark.nat] +pytestmark = [pytest.mark.dataplane_tests, + pytest.mark.nat, pytest.mark.wpa] setup_params_general = { "mode": "NAT", "ssid_modes": { "wpa": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("NAT MODE Dataplane Throughput Test") -@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA Personal Security") +@allure.sub_suite(sub_suite_name="NAT Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputNAT(object): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa" + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and wpa and nat" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3675", name="WIFI-3675") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa_personal @pytest.mark.twog - def test_tcp_upd_wpa_personal_nat_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa_personal and twog" + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa_nat_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode. + pytest -m "dataplane_tests and nat and wpa and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + profile_data = {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" 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) + influx_tags = "dataplane-tcp-udp-nat-wpa-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_2G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA_2G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3676", name="WIFI-3676") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa_personal @pytest.mark.fiveg - def test_tcp_upd_wpa_personal_nat_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): - """Dataplane THroughput nat Mode - pytest -m "dataplane_throughput_test and nat and wpa_personal and fiveg" + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa_nat_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): + """Dataplane THroughput NAT Mode + pytest -m "dataplane_tests and nat and wpa and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + profile_data = {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" - mode = "NAT" + security_key = profile_data["security_key"] + mode = "NAT-WAN" 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_DPT_DPT_WPA_5G_NAT", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + influx_tags = "dataplane-tcp-udp-nat-wpa-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, + instance_name="TIP_DPT_DPT_WPA_5G_NAT", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_vlan_mode.py index e793d39d8..a6dd71520 100644 --- a/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dataplane_throughput_test/wpa_security/test_vlan_mode.py @@ -1,105 +1,92 @@ """ Performance Test: Dataplane Throughput Test: VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa" + pytest -m "dataplane_tests and vlan" """ import os import pytest import allure -pytestmark = [pytest.mark.dataplane_throughput_test, pytest.mark.vlan] +pytestmark = [pytest.mark.vlan, pytest.mark.dataplane_tests, pytest.mark.wpa] setup_params_general = { "mode": "VLAN", "ssid_modes": { "wpa": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, "rf": {}, "radius": False } -@allure.suite("performance") -@allure.feature("VLAN MODE Dataplane Throughput Test") +@allure.feature("Dataplane Tests") +@allure.parent_suite("Dataplane Tests") +@allure.suite(suite_name="WPA Personal Security") +@allure.sub_suite(sub_suite_name="VLAN Mode") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDataplaneThroughputVLAN(object): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and wpa_personal and VLAN" + pytest -m "dataplane_tests and wpa and vlan" """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3675", name="WIFI-3675") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3673", name="WIFI-3673") @pytest.mark.wpa_personal @pytest.mark.twog - def test_tcp_upd_wpa_personal_vlan_2g_band(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): + @allure.title("Test for TCP UDP Download 2.4 GHz") + def test_tcp_upd_wpa_vlan_2g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa_personal and twog" + pytest -m "dataplane_tests and vlan and wpa and twog" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + profile_data = {"ssid_name": "wpa_dataplane_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" + security_key = profile_data["security_key"] mode = "VLAN" band = "twog" - vlan = 100 - 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) + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa-2.4G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA_2G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) - if station: - dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode, - instance_name="TIP_DPT_DPT_WPA_2G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 2.4G") - lf_test.Client_disconnect(station_name=station_names_twog) - assert station - else: - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3676", name="WIFI-3676") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3674", name="WIFI-3674") @pytest.mark.wpa_personal @pytest.mark.fiveg - def test_tcp_upd_wpa_personal_vlan_5g_band(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration): + @allure.title("Test for TCP UDP Download 5 GHz") + def test_tcp_upd_wpa_vlan_5g_band(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, client_type, + get_target_object, + num_stations, setup_configuration): """Dataplane THroughput VLAN Mode - pytest -m "dataplane_throughput_test and vlan and wpa_personal and fiveg" + pytest -m "dataplane_tests and vlan and wpa and fiveg" """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + profile_data = {"ssid_name": "wpa_dataplane_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100} ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] security = "wpa" + security_key = profile_data["security_key"] mode = "VLAN" band = "fiveg" - vlan = 100 - 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_DPT_DPT_WPA_5G_VLAN", - vlan_id=vlan, dut_name=dut_name) - report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput WPA Personal Test - TCP-UDP 5G") - print("Test Completed... Cleaning up Stations") - lf_test.Client_disconnect(station_name=station_names_fiveg) - assert station - else: - assert False \ No newline at end of file + vlan = [100] + influx_tags = "dataplane-tcp-udp-vlan-wpa-5G" + get_test_library.dataplane_throughput_test(ssid=ssid_name, security=security, passkey=security_key, + num_sta=1, mode=mode, + band=band, vlan_id=vlan, + instance_name="TIP_DPT_DPT_WPA_5G_VLAN", + influx_tags=influx_tags, move_to_influx=False, + dut_data=setup_configuration + ) diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_bridge_mode.py index 163bc3eed..889c690b0 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_bridge_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceBridge(object): """ pytest -m "performance and dual_band_test and bridge and open and twog and fiveg" @@ -41,7 +41,7 @@ class TestDualbandPerformanceBridge(object): @pytest.mark.open @pytest.mark.twog @pytest.mark.fiveg - def test_client_open_bridge(self, get_vif_state, lf_tools, + def test_client_open_bridge(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["open"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_nat_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_nat_mode.py index 481c6cb2c..f0c19b190 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_nat_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceNat(object): """ pytest -m "performance and dual_band_test and nat and open and twog and fiveg" @@ -41,7 +41,7 @@ class TestDualbandPerformanceNat(object): @pytest.mark.open @pytest.mark.twog @pytest.mark.fiveg - def test_client_open_nat(self, get_vif_state, lf_tools, + def test_client_open_nat(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["open"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_vlan_mode.py index 84a118fcd..92f13cb6c 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/open/test_vlan_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceVLAN(object): """ pytest -m "performance and dual_band_test and vlan and open and twog and fiveg" @@ -41,7 +41,7 @@ class TestDualbandPerformanceVLAN(object): @pytest.mark.open @pytest.mark.twog @pytest.mark.fiveg - def test_client_open_vlan(self, get_vif_state, lf_tools, + def test_client_open_vlan(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["open"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_bridge_mode.py index ea40b160e..e74876e80 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_bridge_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceBridge(object): """ pytest -m "performance and dual_band_test and bridge and wpa3_personal and twog and fiveg" @@ -42,7 +42,7 @@ class TestDualbandPerformanceBridge(object): @pytest.mark.wpa3_personal @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa3_personal_bridge(self, get_vif_state, lf_tools, + def test_client_wpa3_personal_bridge(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa3_personal"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_nat_mode.py index ce77572dd..e96e84cdd 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_nat_mode.py @@ -28,12 +28,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceNat(object): """ pytest -m "performance and dual_band_test and nat and wpa3_personal and twog and fiveg." @@ -43,7 +43,7 @@ class TestDualbandPerformanceNat(object): @pytest.mark.wpa3_personal @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa3_personal_nat(self, get_vif_state, lf_tools, + def test_client_wpa3_personal_nat(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa3_personal"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_vlan_mode.py index 92f9db8c4..425c7c077 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wap3_personal/test_vlan_mode.py @@ -28,12 +28,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceVlan(object): """ pytest -m "performance and dual_band_test and vlan and wpa3_personal and twog and fiveg" @@ -43,7 +43,7 @@ class TestDualbandPerformanceVlan(object): @pytest.mark.wpa3_personal @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa3_personal_vlan(self, get_vif_state, lf_tools, + def test_client_wpa3_personal_vlan(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa3_personal"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_bridge_mode.py index 3085a4973..0f25096d0 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_bridge_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceBRIDGE(object): """ pytest -m "performance and dual_band_test and BRIDGE and wpa2_personal and twog and fiveg" diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_nat_mode.py index df0c88aa1..dbef0cce3 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceNat(object): """ pytest -m "performance and dual_band_test and nat and wpa2_personal and twog and fiveg" diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_vlan_mode.py index 6f7d45d78..851888f4d 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa2_personal/test_vlan_mode.py @@ -28,12 +28,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceVLAN(object): """ pytest -m "performance and dual_band_test and VLAN and wpa2_personal and twog and fiveg" @@ -42,7 +42,7 @@ class TestDualbandPerformanceVLAN(object): @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa2_personal_vlan(self, get_vif_state, lf_tools, + def test_client_wpa2_personal_vlan(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_bridge_mode.py index d9f32f7a4..7d69ed5ff 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_bridge_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceBRIDGE(object): """ pytest -m "performance and dual_band_test and bridge and wpa_personal and twog and fiveg" @@ -42,7 +42,7 @@ class TestDualbandPerformanceBRIDGE(object): @pytest.mark.wpa @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa_personal_bridge(self, get_vif_state, lf_tools, + def test_client_wpa_personal_bridge(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_nat_mode.py index cf4c0f74d..089dc828e 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceNat(object): """ pytest -m "performance and dual_band_test and nat and wpa_personal and twog and fiveg" @@ -41,7 +41,7 @@ class TestDualbandPerformanceNat(object): @pytest.mark.wpa_personal @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa_personal_nat(self, get_vif_state, lf_tools, + def test_client_wpa_personal_nat(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_vlan_mode.py index 8a807b47e..b177e9bb4 100644 --- a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa_personal/test_vlan_mode.py @@ -28,12 +28,12 @@ setup_params_general = { @pytest.mark.wifi5 @pytest.mark.wifi6 @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDualbandPerformanceVLAN(object): """ pytest -m "performance and dual_band_test and vlan and wpa_personal and twog and fiveg" @@ -43,7 +43,7 @@ class TestDualbandPerformanceVLAN(object): @pytest.mark.wpa @pytest.mark.twog @pytest.mark.fiveg - def test_client_wpa_personal_vlan(self, get_vif_state, lf_tools, + def test_client_wpa_personal_vlan(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): profile_data = setup_params_general["ssid_modes"]["wpa"] ssid_2G = profile_data[0]["ssid_name"] diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_multi_sta_thpt_2g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_multi_sta_thpt_2g.py index db429e221..760063118 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_multi_sta_thpt_2g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_multi_sta_thpt_2g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE WPA2 PERSONAL Multi_Station_Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptbridge(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3631") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -76,7 +76,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3633") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -118,7 +118,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3635") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -157,7 +157,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3637") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -198,7 +198,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3639") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -239,7 +239,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3641") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -280,7 +280,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3643") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -321,7 +321,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3645") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -360,7 +360,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3781") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -399,7 +399,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3783") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -439,7 +439,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3786") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -479,7 +479,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3788") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -520,7 +520,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3790") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -560,7 +560,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3793") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -600,7 +600,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3798") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -640,7 +640,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3800") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -680,7 +680,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3802") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -720,7 +720,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3804") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -760,7 +760,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3806") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -800,7 +800,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3810") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -840,7 +840,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_2g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3812") - def test_mstathpt_wpa2p_bridge_udp_dl_2g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_2g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -880,7 +880,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_2g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3815") - def test_mstathpt_wpa2p_bridge_tcp_dl_2g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_2g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -920,7 +920,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_2g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3817") - def test_mstathpt_wpa2p_bridge_udp_ul_2g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_2g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" @@ -960,7 +960,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_2g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3819") - def test_mstathpt_wpa2p_bridge_tcp_ul_2g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_2g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and twog" diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_mutli_sta_thpt_5g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_mutli_sta_thpt_5g.py index 84c520bb4..be8611323 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_mutli_sta_thpt_5g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/bridge_mode/test_mutli_sta_thpt_5g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("BRIDGE MODE WPA2 PERSONAL Multi_Station_Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptbridge(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3632") - def test_mstathpt_wpa2p_bridge_udp_dl_5g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_5g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -77,7 +77,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3634") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -120,7 +120,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3636") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -160,7 +160,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_5g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3638") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -202,7 +202,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3640") - def test_mstathpt_wpa2p_bridge_udp_dl_5g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_5g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -244,7 +244,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3642") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -286,7 +286,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3644") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -328,7 +328,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_5g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3646") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -368,7 +368,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3782") - def test_mstathpt_wpa2p_bridge_udp_dl_5g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_5g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -408,7 +408,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3784") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -449,7 +449,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3787") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -490,7 +490,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3789") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -531,7 +531,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3792") - def test_mstathpt_wpa2p_bridge_udp_dl_5g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_5g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -572,7 +572,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3794") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -613,7 +613,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3799") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -654,7 +654,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_5g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3801") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -695,7 +695,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3803") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -736,7 +736,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3805") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -777,7 +777,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3807") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -818,7 +818,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_5g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3811") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -859,7 +859,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_dl_5g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3813") - def test_mstathpt_wpa2p_bridge_udp_dl_5g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_dl_5g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -900,7 +900,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_dl_5g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3816") - def test_mstathpt_wpa2p_bridge_tcp_dl_5g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_dl_5g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -941,7 +941,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_udp_ul_5g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3818") - def test_mstathpt_wpa2p_bridge_udp_ul_5g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_udp_ul_5g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" @@ -982,7 +982,7 @@ class TestMultiStaThptbridge(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_bridge_tcp_ul_5g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3820") - def test_mstathpt_wpa2p_bridge_tcp_ul_5g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_bridge_tcp_ul_5g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and bridge and wpa2_personal and fiveg" diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_multi_sta_thpt_2g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_multi_sta_thpt_2g.py index 48be5cd6a..9391cb27e 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_multi_sta_thpt_2g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_multi_sta_thpt_2g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE WPA2 PERSONAL Multi Station Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptnat(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3631") - def test_mstathpt_wpa2p_nat_udp_dl_2g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -77,7 +77,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3633") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -119,7 +119,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3635") - def test_mstathpt_wpa2p_nat_udp_ul_2g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -158,7 +158,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3637") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -199,7 +199,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3639") - def test_mstathpt_wpa2p_nat_udp_dl_2g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -240,7 +240,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3641") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -281,7 +281,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3643") - def test_mstathpt_wpa2p_nat_udp_ul_2g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -322,7 +322,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3645") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -361,7 +361,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3781") - def test_mstathpt_wpa2p_nat_udp_dl_2g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -400,7 +400,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3783") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -439,7 +439,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3786") - def test_mstathpt_wpa2p_nat_udp_ul_2g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -478,7 +478,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3788") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -518,7 +518,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3790") - def test_mstathpt_wpa2p_nat_udp_dl_2g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -557,7 +557,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3793") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -596,7 +596,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3798") - def test_mstathpt_wpa2p_nat_udp_ul_2g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -635,7 +635,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3800") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -674,7 +674,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3802") - def test_mstathpt_wpa2p_nat_udp_dl_2g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -713,7 +713,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3804") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -752,7 +752,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3806") - def test_mstathpt_wpa2p_nat_udp_ul_2g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -791,7 +791,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3810") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -830,7 +830,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_2g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3812") - def test_mstathpt_wpa2p_nat_udp_dl_2g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_2g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -869,7 +869,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_2g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3815") - def test_mstathpt_wpa2p_nat_tcp_dl_2g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_2g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -908,7 +908,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_2g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3817") - def test_mstathpt_wpa2p_nat_udp_ul_2g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_2g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" @@ -947,7 +947,7 @@ class TestMultiStaThptnat(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_2g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3819") - def test_mstathpt_wpa2p_nat_tcp_ul_2g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_2g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and twog" diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_mutli_sta_thpt_5g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_mutli_sta_thpt_5g.py index 03b470a8f..5f371bb63 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_mutli_sta_thpt_5g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/nat_mode/test_mutli_sta_thpt_5g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("NAT MODE WPA2 PERSONAL Multi Station Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptnat(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3632") - def test_mstathpt_wpa2p_nat_udp_dl_5g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_5g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -77,7 +77,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3634") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -120,7 +120,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3636") - def test_mstathpt_wpa2p_nat_udp_ul_5g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -160,7 +160,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_5g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3638") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -202,7 +202,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3640") - def test_mstathpt_wpa2p_nat_udp_dl_5g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_5g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -244,7 +244,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3642") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -286,7 +286,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3644") - def test_mstathpt_wpa2p_nat_udp_ul_5g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -328,7 +328,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_5g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3646") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -369,7 +369,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3782") - def test_mstathpt_wpa2p_nat_udp_dl_5g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_5g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -409,7 +409,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3784") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -449,7 +449,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3787") - def test_mstathpt_wpa2p_nat_udp_ul_5g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -489,7 +489,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3789") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -529,7 +529,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3792") - def test_mstathpt_wpa2p_nat_udp_dl_5g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_5g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -569,7 +569,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3794") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -609,7 +609,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3799") - def test_mstathpt_wpa2p_nat_udp_ul_5g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -649,7 +649,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_5g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3801") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -689,7 +689,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3803") - def test_mstathpt_wpa2p_nat_udp_ul_5g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -729,7 +729,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3805") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -769,7 +769,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3807") - def test_mstathpt_wpa2p_nat_udp_ul_5g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -809,7 +809,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_5g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3811") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -849,7 +849,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_dl_5g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3813") - def test_mstathpt_wpa2p_nat_udp_dl_5g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_dl_5g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -889,7 +889,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_dl_5g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3816") - def test_mstathpt_wpa2p_nat_tcp_dl_5g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_dl_5g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -929,7 +929,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_udp_ul_5g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3818") - def test_mstathpt_wpa2p_nat_udp_ul_5g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_udp_ul_5g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" @@ -969,7 +969,7 @@ class TestMultiStaThptnat(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_nat_tcp_ul_5g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3820") - def test_mstathpt_wpa2p_nat_tcp_ul_5g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_nat_tcp_ul_5g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and nat and wpa2_personal and fiveg" diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_multi_sta_thpt_2g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_multi_sta_thpt_2g.py index 707d96a5d..eb9105e0f 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_multi_sta_thpt_2g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_multi_sta_thpt_2g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN Mode WPA2 PERSONAL Multi Station Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptvlan(object): @pytest.mark.wpa2_personal @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3631") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -77,7 +77,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3633") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -119,7 +119,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3635") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -158,7 +158,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3637") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -199,7 +199,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3639") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -240,7 +240,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3641") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -281,7 +281,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3643") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -322,7 +322,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3645") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -361,7 +361,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3781") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -400,7 +400,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3783") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -439,7 +439,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3786") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -478,7 +478,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3788") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -518,7 +518,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3790") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -557,7 +557,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3793") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -596,7 +596,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3798") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -635,7 +635,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3800") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -674,7 +674,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3802") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -713,7 +713,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3804") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -752,7 +752,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3806") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -791,7 +791,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3810") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -830,7 +830,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_2g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3812") - def test_mstathpt_wpa2p_vlan_udp_dl_2g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_2g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -869,7 +869,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_2g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3815") - def test_mstathpt_wpa2p_vlan_tcp_dl_2g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_2g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -908,7 +908,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_2g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3817") - def test_mstathpt_wpa2p_vlan_udp_ul_2g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_2g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" @@ -947,7 +947,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.twog @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_2g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3819") - def test_mstathpt_wpa2p_vlan_tcp_ul_2g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_2g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and twog" diff --git a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_mutli_sta_thpt_5g.py b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_mutli_sta_thpt_5g.py index 6c48520df..cb53d0b72 100644 --- a/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_mutli_sta_thpt_5g.py +++ b/tests/e2e/basic/performance_tests/multi_station_throughput/wpa2_personal/vlan_mode/test_mutli_sta_thpt_5g.py @@ -25,19 +25,19 @@ setup_params_general = { @allure.suite("performance") @allure.feature("VLAN Mode WPA2 PERSONAL Multi Station Throughput") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMultiStaThptvlan(object): @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_1", url="https://telecominfraproject.atlassian.net/browse/WIFI-3632") - def test_mstathpt_wpa2p_vlan_udp_dl_5g_1(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_5g_1(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -77,7 +77,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_2", url="https://telecominfraproject.atlassian.net/browse/WIFI-3634") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_2(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_2(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -120,7 +120,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_3", url="https://telecominfraproject.atlassian.net/browse/WIFI-3636") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_3(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_3(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -160,7 +160,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_5g_4", url="https://telecominfraproject.atlassian.net/browse/WIFI-3638") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_4(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_4(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -202,7 +202,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_5", url="https://telecominfraproject.atlassian.net/browse/WIFI-3640") - def test_mstathpt_wpa2p_vlan_udp_dl_5g_5(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_5g_5(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -244,7 +244,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_6", url="https://telecominfraproject.atlassian.net/browse/WIFI-3642") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_6(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_6(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -286,7 +286,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_7", url="https://telecominfraproject.atlassian.net/browse/WIFI-3644") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_7(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_7(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -328,7 +328,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_5g_8", url="https://telecominfraproject.atlassian.net/browse/WIFI-3646") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_8(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_8(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -369,7 +369,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_9", url="https://telecominfraproject.atlassian.net/browse/WIFI-3782") - def test_mstathpt_wpa2p_vlan_udp_dl_5g_9(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_5g_9(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -409,7 +409,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_10", url="https://telecominfraproject.atlassian.net/browse/WIFI-3784") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_10(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_10(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -449,7 +449,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_11", url="https://telecominfraproject.atlassian.net/browse/WIFI-3787") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_11(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_11(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -489,7 +489,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_12", url="https://telecominfraproject.atlassian.net/browse/WIFI-3789") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_12(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_12(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -529,7 +529,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_13", url="https://telecominfraproject.atlassian.net/browse/WIFI-3792") - def test_mstathpt_wpa2p_vlan_udp_dl_5g_13(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_5g_13(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -569,7 +569,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_14", url="https://telecominfraproject.atlassian.net/browse/WIFI-3794") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_14(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_14(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -609,7 +609,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_15", url="https://telecominfraproject.atlassian.net/browse/WIFI-3799") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_15(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_15(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -649,7 +649,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_5g_16", url="https://telecominfraproject.atlassian.net/browse/WIFI-3801") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_16(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_16(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -689,7 +689,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_17", url="https://telecominfraproject.atlassian.net/browse/WIFI-3803") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_17(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_17(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -729,7 +729,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_18", url="https://telecominfraproject.atlassian.net/browse/WIFI-3805") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_18(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_18(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -769,7 +769,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_19", url="https://telecominfraproject.atlassian.net/browse/WIFI-3807") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_19(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_19(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -809,7 +809,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_5g_20", url="https://telecominfraproject.atlassian.net/browse/WIFI-3811") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_20(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_20(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -849,7 +849,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_dl_5g_21", url="https://telecominfraproject.atlassian.net/browse/WIFI-3813") - def test_mstathpt_wpa2p_vlan_udp_dl_5g_21(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_dl_5g_21(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -889,7 +889,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_dl_5g_22", url="https://telecominfraproject.atlassian.net/browse/WIFI-3816") - def test_mstathpt_wpa2p_vlan_tcp_dl_5g_22(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_dl_5g_22(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -929,7 +929,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_udp_ul_5g_23", url="https://telecominfraproject.atlassian.net/browse/WIFI-3818") - def test_mstathpt_wpa2p_vlan_udp_ul_5g_23(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_udp_ul_5g_23(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" @@ -969,7 +969,7 @@ class TestMultiStaThptvlan(object): @pytest.mark.fiveg @allure.testcase(name="test_mstathpt_wpa2p_vlan_tcp_ul_5g_24", url="https://telecominfraproject.atlassian.net/browse/WIFI-3820") - def test_mstathpt_wpa2p_vlan_tcp_ul_5g_24(self, get_vif_state, lf_tools, + def test_mstathpt_wpa2p_vlan_tcp_ul_5g_24(self, lf_tools, create_lanforge_chamberview_dut, lf_test, get_configuration): """ pytest -m "multi_sta_thpt and vlan and wpa2_personal and fiveg" diff --git a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_bridge_mode.py index b8659843f..d2505dce2 100644 --- a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_bridge_mode.py @@ -27,12 +27,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("bridge MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal class TestOfdmabridgeMode(object): """ diff --git a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_nat_mode.py index e34f9ce8c..8f00f79d0 100644 --- a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("nat MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal @pytest.mark.twog class TestOfdmaNatMode(object): diff --git a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_vlan_mode.py index 2d2def1ae..1217bb2e3 100644 --- a/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/ofdma_test/wpa2_personal/test_vlan_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.suite("performance") @allure.feature("vlan MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2_personal @pytest.mark.twog class TestOfdmaVlanMode(object): diff --git a/tests/e2e/interOp/openroaming_test/iOS/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/__init__.py similarity index 100% rename from tests/e2e/interOp/openroaming_test/iOS/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/__init__.py diff --git a/tests/e2e/interOp/passpoint_connection_test/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/__init__.py diff --git a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/bridge_mode/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py new file mode 100644 index 000000000..c5ddbae88 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa2_enterprise] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py new file mode 100644 index 000000000..9b7db9d99 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py new file mode 100644 index 000000000..23ac2068e --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa2_enterprise] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py new file mode 100644 index 000000000..8b904626c --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py new file mode 100644 index 000000000..a5326e64d --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py new file mode 100644 index 000000000..e139aab47 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa2_personal] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py new file mode 100644 index 000000000..5e7ccb845 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py @@ -0,0 +1,2257 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py new file mode 100644 index 000000000..7f073ecb8 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py @@ -0,0 +1,1488 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa2_personal] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10674", name="WIFI-10674") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ To verify Wfi Capacity test on a client operating on BRIDGE mode and 20MHz + pytest -m "channel_1 and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1.5Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "ow_sanity_lf and tcp_download and channel_11" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10674", name="WIFI-10674") + @pytest.mark.tcp_download + @pytest.mark.ow_sanity_lf + @pytest.mark.performance + @allure.parent_suite("Throughput Benchmark Test") + @pytest.mark.channel_11 + @allure.suite("2.4 Ghz Band") + @allure.title("Single client TCP Download wifi capacity 40Mhz Bw") + @allure.sub_suite("BRIDGE Mode") + def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + check_connectivity): + """ Single client TCP download Wifi Capacity Test 2.4GHz band 40MHz bandwidth wpa2 personal security BRIDGE mode + pytest -m "ow_sanity_lf and channel_11" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + @pytest.mark.performance + def test_client_wpa2_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + @pytest.mark.performance + def test_client_wpa2_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + @pytest.mark.performance + def test_client_wpa2_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + @pytest.mark.performance + def test_client_wpa2_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + @pytest.mark.performance + def test_client_wpa2_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py new file mode 100644 index 000000000..d566bddfd --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py new file mode 100644 index 000000000..7431c41ed --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py @@ -0,0 +1,553 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 80, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.ow_sanity_lf + @pytest.mark.performance + @allure.parent_suite("Throughput Benchmark Test") + @allure.suite("5 Ghz Band") + @allure.title("Single client TCP Download wifi capacity 80Mhz Bw") + @allure.sub_suite("BRIDGE Mode") + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ Single client TCP download Wifi Capacity Test 5GHz band 80MHz bandwidth wpa2 personal security BRIDGE mode + pytest -m "ow_sanity_lf and channel_36" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1.5Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + @pytest.mark.performance + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10673", name="WIFI-10673") + @pytest.mark.tcp_bidirectional + @pytest.mark.performance + @pytest.mark.channel_36 + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + @pytest.mark.performance + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + @pytest.mark.performance + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + @pytest.mark.performance + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 80, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 80, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 80, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py new file mode 100644 index 000000000..4d182d075 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa3_enterprise] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py new file mode 100644 index 000000000..adc15b1c8 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py new file mode 100644 index 000000000..5b69de5e8 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa3_enterprise] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py new file mode 100644 index 000000000..77ddb9e29 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py new file mode 100644 index 000000000..75f5d5730 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/passpoint_connection_test/nat_mode/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/nat_mode/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py new file mode 100644 index 000000000..23d015d48 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa3_personal] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py new file mode 100644 index 000000000..91637caef --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py new file mode 100644 index 000000000..65217c628 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa3_personal] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py new file mode 100644 index 000000000..82501c0bd --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py new file mode 100644 index 000000000..e470196de --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/passpoint_connection_test/nat_mode/android/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/nat_mode/android/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py new file mode 100644 index 000000000..f7774e5a5 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py new file mode 100644 index 000000000..287bc5148 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and bridge and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py new file mode 100644 index 000000000..4647c9090 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa] + +setup_params_general_1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py new file mode 100644 index 000000000..c705a0657 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py new file mode 100644 index 000000000..2db01e531 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/bridge_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.bridge, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test BRIDGE mode + pytest -m "wifi_capacity_test and BRIDGE and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + get_test_library.wifi_capacity(instance_name="test_client_wpa_bridge_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/__init__.py similarity index 100% rename from tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/__init__.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py new file mode 100644 index 000000000..b0700f47c --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa2_enterprise] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py new file mode 100644 index 000000000..f10bc9e2c --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_2g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py new file mode 100644 index 000000000..0280c8895 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa2_enterprise] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py new file mode 100644 index 000000000..962614b48 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py new file mode 100644 index 000000000..085263574 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_enterprise_encryption/test_peak_throughput_wpa2_eap_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa2_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_enterprise": [{"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py new file mode 100644 index 000000000..de85f6ba1 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa2_personal] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py new file mode 100644 index 000000000..99f486ae3 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py new file mode 100644 index 000000000..4f34fe567 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_2g.py @@ -0,0 +1,1470 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa2_personal] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.performance + def test_client_wpa2_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + @pytest.mark.performance + def test_client_wpa2_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + @pytest.mark.performance + def test_client_wpa2_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + @pytest.mark.performance + def test_client_wpa2_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + @pytest.mark.performance + def test_client_wpa2_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + @pytest.mark.performance + def test_client_wpa2_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py new file mode 100644 index 000000000..608fccbb0 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py new file mode 100644 index 000000000..85fea23c2 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa2_personal_encryption/test_peak_throughput_wpa2_80Mhz_5g.py @@ -0,0 +1,548 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa2_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 80, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.performance + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + @pytest.mark.performance + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + @pytest.mark.performance + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + @pytest.mark.performance + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + @pytest.mark.performance + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + @pytest.mark.performance + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 80, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 80, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 80, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa2_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa2_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa2_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa2_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa2_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa2_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa2_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py new file mode 100644 index 000000000..746467981 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa3_enterprise] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py new file mode 100644 index 000000000..0d20b8997 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_2g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_eap_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py new file mode 100644 index 000000000..c4f87ce4d --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa3_enterprise] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_enterprise_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_enterprise_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_enterprise_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_enterprise_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_enterprise_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_enterprise_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_enterprise_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_enterprise_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py new file mode 100644 index 000000000..70478b5b0 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py new file mode 100644 index 000000000..e8ce43cb9 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_enterprise_encryption/test_peak_throughput_wpa3_eap_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa3_enterprise] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise": [{"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": True +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_eap_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_eap_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_eap_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_eap_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_eap_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_eap_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_eap_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py new file mode 100644 index 000000000..7ef732c1e --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa3_personal] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py new file mode 100644 index 000000000..55f12f09b --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_2g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py new file mode 100644 index 000000000..bf9ea3103 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa3_personal] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_personal_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_personal_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_personal_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_personal_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_personal_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_personal_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_personal_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py new file mode 100644 index 000000000..29bbdb251 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py new file mode 100644 index 000000000..f9ab2a608 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa3_personal_encryption/test_peak_throughput_wpa3_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa3_personal] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [{"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa3_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa3_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa3_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa3_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa3_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa3_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa3_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/__init__.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/__init__.py rename to tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/__init__.py diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py new file mode 100644 index 000000000..1038f7659 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_20, + pytest.mark.wpa] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py new file mode 100644 index 000000000..888744fcb --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_20Mhz_5g.py @@ -0,0 +1,2258 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_20, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 40} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_40 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel40PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_40", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general3 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general4 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 48} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_48 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel48PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_48", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general6 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 56} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_56 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel56PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_56", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general8 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_64", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 64} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_64 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel64PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_64", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general10 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 104} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_104 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel104PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_104", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general12 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 112} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_112 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel112PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_112", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general13 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 116} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_116 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel116PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_116", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 20, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_114 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general17 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 20, + "channel": 144} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_144 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestCountryCA20Mhz5GChannel144PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and nat and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_144", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py new file mode 100644 index 000000000..154cb5b26 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_2g.py @@ -0,0 +1,1465 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.twog, pytest.mark.channel_width_40, + pytest.mark.wpa] + +setup_params_general_1 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 1 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_1 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel1PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_1", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_2 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 2 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_2 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel2PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_2", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_3 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 3 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel3PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_3", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_4 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel4PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_4", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_5 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 4 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_3 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel5PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_5", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_6 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 6 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_6 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel6PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_6", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_7 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_7 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel7PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_7", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_8 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_8 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel8PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_8", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_9 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_9 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel9PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_9", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_10 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_10 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel10PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_10", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + +setup_params_general_11 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"}]}, + "rf": { + "2G": { + 'band': '2G', + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_11 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test20Mhz2GChannel11PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_11", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py new file mode 100644 index 000000000..86ae8a371 --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_40Mhz_5g.py @@ -0,0 +1,1175 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_40, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general2 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 44} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_44 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel44PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_44", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general7 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 60} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_60 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel60PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_60", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general11 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 108 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_108 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel108PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_108", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general15 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 136} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_136 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel136PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_136", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general16 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 140} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_140 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test40Mhz5GChannel140PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_140", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py new file mode 100644 index 000000000..6f553f4de --- /dev/null +++ b/tests/e2e/basic/performance_tests/peak_throughput_tests/nat_mode/wpa_encryption/test_peak_throughput_wpa_80Mhz_5g.py @@ -0,0 +1,543 @@ +""" + + Performance Test: Country code along with Channel and Channel-width Test: Bridge Mode + pytest -m "country_code and Bridge" + +""" + +import allure +import pytest + + +pytestmark = [pytest.mark.peak_throughput_tests, pytest.mark.nat, pytest.mark.fiveg, pytest.mark.channel_width_80, + pytest.mark.wpa] + +setup_params_general1 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 36 + } + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_36 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel36PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + @pytest.mark.aaa + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_36", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general5 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": { + "5G": { + 'band': '5G', + 'channel-width': 40, + "channel": 52} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_52 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel52PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_52", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general9 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 100} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_100 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel100PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_100", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + +setup_params_general14 = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": { + "5G": { + 'band': '5G', + + 'channel-width': 40, + "channel": 132} + }, + "radius": False +} + + +@allure.feature("PEAK THROUGHPUT TESTS") +@pytest.mark.channel_132 +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class Test80Mhz5GChannel132PeakThroughput(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6934", name="WIFI-6934") + @pytest.mark.tcp_download + def test_client_wpa_nat_tcp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6944", name="WIFI-6944") + @pytest.mark.udp_download + def test_client_wpa_nat_udp_dl(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6943", name="WIFI-6943") + @pytest.mark.tcp_bidirectional + def test_client_wpa_nat_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6946", name="WIFI-6946") + @pytest.mark.udp_bidirectional + def test_client_wpa_nat_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_bidirectional", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6942", name="WIFI-6942") + @pytest.mark.tcp_upload + def test_client_wpa_nat_tcp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_tcp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6945", name="WIFI-6945") + @pytest.mark.udp_upload + def test_client_wpa_nat_udp_ul(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ Wifi Capacity Test NAT mode + pytest -m "wifi_capacity_test and NAT and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_132", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + mode = "NAT" + get_test_library.wifi_capacity(instance_name="test_client_wpa_nat_udp_ul", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}) + assert True diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_bridge_mode.py index de2db96fc..f2e2ea46b 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_bridge_mode.py @@ -35,12 +35,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz20 class TestThroughputUnderCombinationsBridge20MHz(object): @@ -595,12 +595,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz80 class TestThroughputUnderCombinationsBridge80MHz(object): @@ -1173,12 +1173,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz160 class TestThroughputUnderCombinationsBridge160MHz(object): diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_nat_mode.py index d3f6b6047..62a2ce332 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_nat_mode.py @@ -31,12 +31,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz20 class TestThroughputUnderCombinationsNAT20MHz(object): @@ -588,12 +588,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz80 class TestThroughputUnderCombinationsNAT80MHz(object): @@ -1166,12 +1166,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz160 class TestThroughputUnderCombinationsNAT160MHz(object): diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_vlan_mode.py index b70262181..2444b08bd 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/tcp_udp_upstream_downstream_bidirection_throughput_test/wpa2_personal/test_vlan_mode.py @@ -36,12 +36,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz20 class TestThroughputUnderCombinationsVLAN20MHz(object): @@ -598,12 +598,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz80 class TestThroughputUnderCombinationsVLAN80MHz(object): @@ -1177,12 +1177,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.Mhz160 class TestThroughputUnderCombinationsVLAN160MHz(object): diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_bridge_mode.py index f6a5e2aac..0ecd351f7 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_bridge_mode.py @@ -36,12 +36,12 @@ setup_params_general_20Mhz = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_20Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw20MhzBRIDGE(object): """Throughput Across Bw Bridge Mode pytest -m "throughput_across_bw_test and Bridge" @@ -148,12 +148,12 @@ setup_params_general_40Mhz = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_40Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw40MhzBRIDGE(object): """Throughput Across Bw Bridge Mode pytest -m "throughput_across_bw_test and Bridge" @@ -255,12 +255,12 @@ setup_params_general_80Mhz = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_80Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw80MhzBRIDGE(object): """Throughput Across Bw Bridge Mode pytest -m "throughput_across_bw_test and Bridge" @@ -306,7 +306,6 @@ class TestThroughputAcrossBw80MhzBRIDGE(object): assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-9742", name="WIFI-9742") - @pytest.mark.ow_sanity_lf @allure.parent_suite("Throughput Test") @allure.suite("OpenWifi Throughput across channel bandwidth") @allure.title("Single client wifi capacity 80Mhz Bw") @@ -362,12 +361,12 @@ setup_params_general_160Mhz = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_160Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw160MhzBRIDGE(object): """Throughput Across Bw Bridge Mode pytest -m "throughput_across_bw_test and Bridge" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_nat_mode.py index 4d1b0e748..492f0ae68 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_nat_mode.py @@ -36,12 +36,12 @@ setup_params_general_20Mhz = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_20Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw20MhzNAT(object): """Throughput Across Bw NAT Mode pytest -m "throughput_across_bw_test and NAT" @@ -149,12 +149,12 @@ setup_params_general_40Mhz = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_40Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw40MhzNAT(object): """Throughput Across Bw NAT Mode pytest -m "throughput_across_bw_test and NAT" @@ -256,12 +256,12 @@ setup_params_general_80Mhz = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_80Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw80MhzNAT(object): """Throughput Across Bw NAT Mode pytest -m "throughput_across_bw_test and NAT" @@ -307,7 +307,6 @@ class TestThroughputAcrossBw80MhzNAT(object): assert False @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-9743", name="WIFI-9743") - @pytest.mark.ow_sanity_lf @allure.parent_suite("Throughput Test") @allure.suite("OpenWifi Throughput across channel bandwidth") @allure.title("Single client wifi capacity 80Mhz Bw") @@ -364,12 +363,12 @@ setup_params_general_160Mhz = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_160Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw160MhzNAT(object): """Throughput Across Bw NAT Mode pytest -m "throughput_across_bw_test and NAT" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_vlan_mode.py index b890251de..aa284b6ff 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_across_channel_bw/test_vlan_mode.py @@ -32,12 +32,12 @@ setup_params_general_20Mhz = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_20Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw20MhzVLAN(object): """Throughput Across Bw VLAN Mode pytest -m "throughput_across_bw_test and VLAN" @@ -141,12 +141,12 @@ setup_params_general_40Mhz = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_40Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw40MhzVLAN(object): """Throughput Across Bw VLAN Mode pytest -m "throughput_across_bw_test and VLAN" @@ -249,12 +249,12 @@ setup_params_general_80Mhz = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_80Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw80MhzVLAN(object): """Throughput Across Bw VLAN Mode pytest -m "throughput_across_bw_test and VLAN" @@ -358,12 +358,12 @@ setup_params_general_160Mhz = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general_160Mhz], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputAcrossBw160MhzVLAN(object): """Throughput Across Bw VLAN Mode pytest -m "throughput_across_bw_test and VLAN" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_bridge_mode.py index ad2ee1bd0..d10a9fe3e 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_bridge_mode.py @@ -23,12 +23,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktBridge2G(object): """Throughput vs Various Pkt Size Test Bridge mode pytest -m "throughput_vs_pkt and Bridge" @@ -340,12 +340,12 @@ setup_params_5g = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktBridge5G(object): """Throughput vs Various Pkt Size Test Bridge mode pytest -m "throughput_vs_pkt and Bridge" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_nat_mode.py index 851ab45f7..34249f45f 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_nat_mode.py @@ -23,12 +23,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktNAT2G(object): """Throughput vs Various Pkt Size Test NAT mode pytest -m "throughput_vs_pkt and NAT" @@ -334,12 +334,12 @@ setup_params_5g = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktNAT5G(object): """Throughput vs Various Pkt Size Test NAT mode pytest -m "throughput_vs_pkt and NAT" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_vlan_mode.py index 847742bdc..41c914052 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/open_security/test_vlan_mode.py @@ -23,12 +23,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktVLAN2G(object): """Throughput vs Various Pkt Size Test VLAN mode pytest -m "throughput_vs_pkt and VLAN" @@ -333,12 +333,12 @@ setup_params_5g = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktVLAN5G(object): """Throughput vs Various Pkt Size Test VLAN mode pytest -m "throughput_vs_pkt and VLAN" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_bridge_mode.py index 101cf5225..47ca183a7 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_bridge_mode.py @@ -25,12 +25,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2 class TestThroughputVsPktWpa2Bridge2G(object): """Throughput vs Various Pkt Size Test Bridge mode @@ -338,12 +338,12 @@ setup_params_5g = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa2 class TestThroughputVsPktWpa2Bridge5G(object): """Throughput vs Various Pkt Size Test Bridge mode diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_nat_mode.py index 3e5f94475..d9c10abd3 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_nat_mode.py @@ -25,12 +25,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa2Nat2G(object): """Throughput vs Various Pkt Size Test nat mode pytest -m "throughput_vs_pkt and nat" @@ -342,12 +342,12 @@ setup_params_5g = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa2Nat5G(object): """Throughput vs Various Pkt Size Test nat mode pytest -m "throughput_vs_pkt and nat" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_vlan_mode.py index 2cfb2ee4d..cf0aa6b33 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa2_security/test_vlan_mode.py @@ -23,12 +23,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa2Vlan2G(object): """Throughput vs Various Pkt Size Test Vlan mode pytest -m "throughput_vs_pkt and vlan" @@ -340,12 +340,12 @@ setup_params_5g = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa2Vlan5g(object): """Throughput vs Various Pkt Size Test Vlan mode pytest -m "throughput_vs_pkt and vlan" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_bridge_mode.py index c34e61553..664fa3684 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_bridge_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa3Bridge2G(object): """Throughput vs Various Pkt Size Test Bridge mode pytest -m "throughput_vs_pkt and bridge" @@ -339,12 +339,12 @@ setup_params_5g = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktBridgeWpa35G(object): """Throughput vs Various Pkt Size Test Bridge mode pytest -m "throughput_vs_pkt and bridge" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_nat_mode.py index 20a761042..085af30a6 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_nat_mode.py @@ -26,12 +26,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa3Nat2G(object): """Throughput vs Various Pkt Size Test nat mode pytest -m "throughput_vs_pkt and nat" @@ -344,12 +344,12 @@ setup_params_5g = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa3Nat5G(object): """Throughput vs Various Pkt Size Test nat mode pytest -m "throughput_vs_pkt and nat" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_vlan_mode.py index c67b665bf..f1e666ca8 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa3_security/test_vlan_mode.py @@ -25,12 +25,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa3Vlan2G(object): """Throughput vs Various Pkt Size Test vlan mode pytest -m "throughput_vs_pkt and vlan" @@ -343,12 +343,12 @@ setup_params_5g = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpa3Vlan5G(object): """Throughput vs Various Pkt Size Test vlan mode pytest -m "throughput_vs_pkt and vlan" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_bridge_mode.py index 00823bfa6..580763713 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_bridge_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_bridge_mode.py @@ -24,12 +24,12 @@ setup_params_general = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpaBridge2G(object): """Throughput vs Various Pkt Size Test BRIDGE MODE pytest -m "throughput_vs_pkt and Bridge" @@ -340,12 +340,12 @@ setup_params_5g = { @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktWpaBridge5G(object): """Throughput vs Various Pkt Size Test BRIDGE MODE pytest -m "throughput_vs_pkt and Bridge" diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_nat_mode.py index 2a8fb4a0a..a88ab631f 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_nat_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_nat_mode.py @@ -25,12 +25,12 @@ setup_params_general = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa class TestThroughputVsPktWpaNat2G(object): """Throughput vs Various Pkt Size Test nat mode @@ -333,12 +333,12 @@ setup_params_5g = { @allure.feature("NAT MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa class TestThroughputVsPktWpaNat5G(object): """Throughput vs Various Pkt Size Test nat mode diff --git a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_vlan_mode.py index 8f634a645..ed3da9481 100644 --- a/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_vlan_mode.py +++ b/tests/e2e/basic/performance_tests/throughput_benchmark/throughput_vs_various_pkt_sizes/wpa_security/test_vlan_mode.py @@ -24,12 +24,12 @@ setup_params_general = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktVLANWpa2G(object): """Throughput vs Various Pkt Size Test VLAN MODE pytest -m "throughput_vs_pkt and VLAN" @@ -341,12 +341,12 @@ setup_params_5g = { @allure.feature("VLAN MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_5g], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestThroughputVsPktVLANWpa5G(object): """Throughput vs Various Pkt Size Test VLAN MODE pytest -m "throughput_vs_pkt and VLAN" diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/__init__.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/open/__init__.py deleted file mode 100644 index 8b1378917..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_bridge_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_bridge_mode.py deleted file mode 100644 index 49b1d6b23..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_bridge_mode.py +++ /dev/null @@ -1,451 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : BRIDGE Mode - pytest -m "wifi_capacity_test and BRIDGE" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_dual_band", "appliedRadios": ["2G", "5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.bridge -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -@pytest.mark.open -@pytest.mark.wifi_capacity_test -class TestWifiCapacityBRIDGEModeDualBand(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3695", name="WIFI-3695") - @pytest.mark.open - @pytest.mark.tcp_download - @pytest.mark.dual_band - def test_client_open_bridge_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3696", name="WIFI-3696") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_bridge_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3698", name="WIFI-3698") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_bridge_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3697", name="WIFI-3697") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_bridge_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityBRIDGEMode2G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3648", name="WIFI-3648") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3654", name="WIFI-3654") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3670", name="WIFI-3670") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3664", name="WIFI-3664") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityBRIDGEMode5G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3649", name="WIFI-3649") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3655", name="WIFI-3655") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3671", name="WIFI-3671") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3665", name="WIFI-3665") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_nat_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_nat_mode.py deleted file mode 100644 index 65f893d7f..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_nat_mode.py +++ /dev/null @@ -1,436 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : NAT Mode - pytest -m "wifi_capacity_test and NAT" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "NAT", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_dual_band", "appliedRadios": ["2G", "5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityNATModeDualBand(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3695", name="WIFI-3695") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_nat_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3696", name="WIFI-3696") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_nat_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3698", name="WIFI-3698") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_nat_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3697", name="WIFI-3697") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_nat_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "NAT", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityNATMode2G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3648", name="WIFI-3648") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3654", name="WIFI-3654") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3670", name="WIFI-3670") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3664", name="WIFI-3664") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "NAT", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityNATMode5G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3649", name="WIFI-3649") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3655", name="WIFI-3655") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3671", name="WIFI-3671") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3665", name="WIFI-3665") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_vlan_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_vlan_mode.py deleted file mode 100644 index 2409b1775..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/open/test_vlan_mode.py +++ /dev/null @@ -1,436 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : VLAN Mode - pytest -m "wifi_capacity_test and VLAN" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.VLAN] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "VLAN", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_dual_band", "appliedRadios": ["2G", "5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityVLANModeDualBand(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3695", name="WIFI-3695") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3696", name="WIFI-3696") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3698", name="WIFI-3698") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_wpa2_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test vlan mode - pytest -m "wifi_capacity_test and VLAN and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3697", name="WIFI-3697") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "VLAN", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityVLANMode2G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3648", name="WIFI-3648") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3654", name="WIFI-3654") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3670", name="WIFI-3670") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3664", name="WIFI-3664") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "VLAN", - "ssid_modes": { - "open": [ - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.open -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityVLANMode5G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3649", name="WIFI-3649") - @pytest.mark.open - @pytest.mark.tcp_download - def test_client_open_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3655", name="WIFI-3655") - @pytest.mark.open - @pytest.mark.udp_download - def test_client_open_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3671", name="WIFI-3671") - @pytest.mark.open - @pytest.mark.tcp_bidirectional - def test_client_open_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3665", name="WIFI-3665") - @pytest.mark.open - @pytest.mark.udp_bidirectional - def test_client_open_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and open and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_open_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_bridge_mode.py deleted file mode 100644 index 12fc75bdd..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_bridge_mode.py +++ /dev/null @@ -1,575 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : BRIDGE Mode - pytest -m "wifi_capacity_test and BRIDGE" - -""" -import logging -import allure -import pytest - -LOGGER = logging.getLogger(__name__) - -pytestmark = [pytest.mark.performance, pytest.mark.bridge] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE WIFI CAPACITY TEST") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.bridge -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -@pytest.mark.wpa2_personal -@pytest.mark.wifi_capacity_test -class TestWifiCapacityBRIDGEModeDualBand(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3926", name="WIFI-3926") - @pytest.mark.tcp_download - def test_client_wpa2_BRIDGE_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - LOGGER.info('test_client_wpa2_BRIDGE_tcp_dl Test Setup Finished, Starting test now...') - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-download-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="0", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - LOGGER.info('test_client_wpa2_BRIDGE_tcp_dl Test Finished') - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3927", name="WIFI-3927") - @pytest.mark.udp_download - def test_client_wpa2_BRIDGE_udp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-download-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="0", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3932", name="WIFI-3932") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_BRIDGE_tcp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-bidirectional-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3933", name="WIFI-3933") - @pytest.mark.udp_bidirectional - def test_client_wpa2_BRIDGE_udp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-bidirectional-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") - @pytest.mark.tcp_upload - def test_client_wpa2_bridge_tcp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-upload-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") - @pytest.mark.udp_upload - def test_client_wpa2_bridge_udp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-upload-bridge-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_2G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE Wifi Capacity") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityBRIDGEMode2G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3928", name="WIFI-3928") - @pytest.mark.tcp_download - def test_client_wpa2_BRIDGE_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "download", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3930", name="WIFI-3930") - @pytest.mark.udp_download - def test_client_wpa2_BRIDGE_udp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "download", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3934", name="WIFI-3934") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_BRIDGE_tcp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "bidirectional", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3935", name="WIFI-3935") - @pytest.mark.udp_bidirectional - def test_client_wpa2_BRIDGE_udp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "bidirectional", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") - @pytest.mark.tcp_upload - def test_client_wpa2_bridge_tcp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "upload", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") - @pytest.mark.udp_upload - def test_client_wpa2_bridge_udp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "upload", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_5G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityBRIDGEMode5G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3929", name="WIFI-3929") - @pytest.mark.tcp_download - def test_client_wpa2_BRIDGE_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3931", name="WIFI-3931") - @pytest.mark.udp_download - def test_client_wpa2_BRIDGE_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3936", name="WIFI-3936") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_BRIDGE_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3937", name="WIFI-3937") - @pytest.mark.udp_bidirectional - def test_client_wpa2_BRIDGE_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_nat_mode.py deleted file mode 100644 index ec920f7b5..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_nat_mode.py +++ /dev/null @@ -1,575 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : NAT Mode - pytest -m "wifi_capacity_test and NAT" - -""" -import logging -import allure -import pytest - -LOGGER = logging.getLogger(__name__) - -pytestmark = [pytest.mark.performance, pytest.mark.nat] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE WIFI CAPACITY TEST") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.bridge -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -@pytest.mark.wpa2_personal -@pytest.mark.wifi_capacity_test -class TestWifiCapacityNATModeDualBand(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3926", name="WIFI-3926") - @pytest.mark.tcp_download_wct - def test_client_wpa2_NAT_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - LOGGER.info('test_client_wpa2_NAT_tcp_dl Test Setup Finished, Starting test now...') - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-download-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="0", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - LOGGER.info('test_client_wpa2_NAT_tcp_dl Test Finished') - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3927", name="WIFI-3927") - @pytest.mark.udp_download - def test_client_wpa2_NAT_udp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-download-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="100Mbps", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3932", name="WIFI-3932") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_NAT_tcp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-bidirectional-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3933", name="WIFI-3933") - @pytest.mark.udp_bidirectional - def test_client_wpa2_NAT_udp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-bidirectional-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") - @pytest.mark.tcp_upload - def test_client_wpa2_NAT_tcp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-tcp-upload-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") - @pytest.mark.udp_upload - def test_client_wpa2_NAT_udp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - sets = [["DUT_NAME", lf_tools.dut_name]] - print("sets", sets) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = "wifi-capacity-udp-upload-nat-wpa2-2.4G-5G" - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, sets=sets, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", move_to_influx=False) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - lf_tools.attach_report_kpi(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_2G = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE Wifi Capacity") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityNATMode2G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3928", name="WIFI-3928") - @pytest.mark.tcp_download - def test_client_wpa2_NAT_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "download", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3930", name="WIFI-3930") - @pytest.mark.udp_download - def test_client_wpa2_NAT_udp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "download", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3934", name="WIFI-3934") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_NAT_tcp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "bidirectional", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3935", name="WIFI-3935") - @pytest.mark.udp_bidirectional - def test_client_wpa2_NAT_udp_bidirectional(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "bidirectional", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7127", name="WIFI-7127") - @pytest.mark.tcp_upload - def test_client_wpa2_bridge_tcp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "upload", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7128", name="WIFI-7128") - @pytest.mark.udp_upload - def test_client_wpa2_bridge_udp_ul(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - max = int(get_apnos_max_clients[0]) - lf_tools.add_stations(band="2G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="5G", num_stations=max, dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "upload", "2.4G"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_ul", mode=mode, vlan_id=vlan, - download_rate="0", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_5G = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityNATMode5G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3929", name="WIFI-3929") - @pytest.mark.tcp_download - def test_client_wpa2_NAT_tcp_dl(self, lf_tools, get_apnos_max_clients, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3931", name="WIFI-3931") - @pytest.mark.udp_download - def test_client_wpa2_NAT_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3936", name="WIFI-3936") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_NAT_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3937", name="WIFI-3937") - @pytest.mark.udp_bidirectional - def test_client_wpa2_NAT_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_vlan_mode.py deleted file mode 100644 index 1356c0049..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa2_personal/test_vlan_mode.py +++ /dev/null @@ -1,388 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : VLAN Mode - pytest -m "wifi_capacity_test and VLAN" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.performance, pytest.mark.vlan] - - -setup_params_general_dual_band = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityVLANModeDualBand(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3926", name="WIFI-3926") - @pytest.mark.tcp_download - def test_client_wpa2_VLAN_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3927", name="WIFI-3927") - @pytest.mark.udp_download - def test_client_wpa2_VLAN_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3932", name="WIFI-3932") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_VLAN_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3933", name="WIFI-3933") - @pytest.mark.udp_bidirectional - def test_client_wpa2_VLAN_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_2G = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityVLANMode2G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3928", name="WIFI-3928") - @pytest.mark.tcp_download - def test_client_wpa2_VLAN_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3930", name="WIFI-3930") - @pytest.mark.udp_download - def test_client_wpa2_VLAN_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3934", name="WIFI-3934") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_VLAN_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3935", name="WIFI-3935") - @pytest.mark.udp_bidirectional - def test_client_wpa2_VLAN_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - -setup_params_general_5G = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa2_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityVLANMode5G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3929", name="WIFI-3929") - @pytest.mark.tcp_download - def test_client_wpa2_VLAN_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3931", name="WIFI-3931") - @pytest.mark.udp_download - def test_client_wpa2_VLAN_udp_dl(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3936", name="WIFI-3936") - @pytest.mark.tcp_bidirectional - def test_client_wpa2_VLAN_tcp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3937", name="WIFI-3937") - @pytest.mark.udp_bidirectional - def test_client_wpa2_VLAN_udp_bidirectional(self, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN and wpa2_personal and twog" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_bridge_mode.py deleted file mode 100644 index 5fcc4c8ca..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_bridge_mode.py +++ /dev/null @@ -1,464 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : BRIDGE Mode - pytest -m "wifi_capacity_test and BRIDGE" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.bridge -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -@pytest.mark.wpa3_personal -@pytest.mark.wifi_capacity_test -class TestWifiCapacityBRIDGEModeDualBand(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3693", name="WIFI-3693") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and dual_band" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - get_vif_state.append(ssid_name) - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3694", name="WIFI-3694") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and dual_band" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - get_vif_state.append(ssid_name) - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3691", name="WIFI-3691") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and dual_band" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3692", name="WIFI-3692") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and dual_band" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityBRIDGEMode2G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3651", name="WIFI-3651") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3658", name="WIFI-3658") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3668", name="WIFI-3668") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3662", name="WIFI-3662") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityBRIDGEMode5G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3653", name="WIFI-3653") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_nat_mode.py deleted file mode 100644 index d6efaa7ec..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_nat_mode.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : NAT Mode - pytest -m "wifi_capacity_test and NAT" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityNATModeDualBand(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3693", name="WIFI-3693") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3694", name="WIFI-3694") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3691", name="WIFI-3691") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3692", name="WIFI-3692") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityNATMode2G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3651", name="WIFI-3651") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3658", name="WIFI-3658") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3668", name="WIFI-3668") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3662", name="WIFI-3662") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityNATMode5G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3653", name="WIFI-3653") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_vlan_mode.py deleted file mode 100644 index 9082003b7..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa3_personal/test_vlan_mode.py +++ /dev/null @@ -1,435 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : VLAN Mode - pytest -m "wifi_capacity_test and VLAN" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.VLAN] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa3_personal -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityVLANModeDualBand(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3693", name="WIFI-3693") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3694", name="WIFI-3694") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3691", name="WIFI-3691") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test vlan mode - pytest -m "wifi_capacity_test and VLAN and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3692", name="WIFI-3692") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityVLANMode2G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3651", name="WIFI-3651") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3658", name="WIFI-3658") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3668", name="WIFI-3668") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3662", name="WIFI-3662") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "VLAN", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa3_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityVLANMode5G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3653", name="WIFI-3653") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_download - def test_client_wpa3_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659") - @pytest.mark.wpa3_personal - @pytest.mark.udp_download - def test_client_wpa3_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669") - @pytest.mark.wpa3_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa3_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663") - @pytest.mark.wpa3_personal - @pytest.mark.udp_bidirectional - def test_client_wpa3_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa3_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa3_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa3_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_bridge_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_bridge_mode.py deleted file mode 100644 index f33c90226..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_bridge_mode.py +++ /dev/null @@ -1,461 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : BRIDGE Mode - pytest -m "wifi_capacity_test and BRIDGE" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.bridge -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -@pytest.mark.wpa_personal -@pytest.mark.wifi_capacity_test -class TestWifiCapacityBRIDGEModeDualBand(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3687", name="WIFI-3687") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_bridge_tcp_dl(self, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3688", name="WIFI-3688") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - get_vif_state.append(ssid_name) - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "download", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3689", name="WIFI-3689") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["tcp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3690", name="WIFI-3690") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - lf_tools.reset_scenario() - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - # lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - influx_tags = ["udp", "bidirectional", "2.4G-5G Combined"] - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256", - influx_tags=influx_tags, - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityBRIDGEMode2G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3650", name="WIFI-3650") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3656", name="WIFI-3656") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3666", name="WIFI-3666") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3660", name="WIFI-3660") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityBRIDGEMode5G(object): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and BRIDGE" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3652", name="WIFI-3652") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_bridge_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3657", name="WIFI-3657") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_bridge_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3667", name="WIFI-3667") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_bridge_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3661", name="WIFI-3661") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_bridge_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test BRIDGE mode - pytest -m "wifi_capacity_test and bridge and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_BRIDGE_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_nat_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_nat_mode.py deleted file mode 100644 index ba7561f6d..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_nat_mode.py +++ /dev/null @@ -1,438 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : NAT Mode - pytest -m "wifi_capacity_test and NAT" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "NAT", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityNATModeDualBand(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3687", name="WIFI-3687") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3688", name="WIFI-3688") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3689", name="WIFI-3689") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3690", name="WIFI-3690") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "NAT", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityNATMode2G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3650", name="WIFI-3650") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3656", name="WIFI-3656") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3666", name="WIFI-3666") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3660", name="WIFI-3660") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "NAT", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityNATMode5G(object): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and NAT" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3652", name="WIFI-3652") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_nat_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3657", name="WIFI-3657") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_nat_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3667", name="WIFI-3667") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_nat_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3661", name="WIFI-3661") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_nat_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test NAT mode - pytest -m "wifi_capacity_test and nat and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 - if ssid_name not in get_vif_state: - allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="ax", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_NAT_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_vlan_mode.py b/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_vlan_mode.py deleted file mode 100644 index 6ab26a737..000000000 --- a/tests/e2e/basic/performance_tests/wifi_capacity_test/wpa_personal/test_vlan_mode.py +++ /dev/null @@ -1,435 +0,0 @@ -""" - - Performance Test: Wifi Capacity Test : VLAN Mode - pytest -m "wifi_capacity_test and VLAN" - -""" -import os -import pytest -import allure - -pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.VLAN] -# """pytest.mark.usefixtures("setup_test_run")"""] - - -setup_params_general_dual_band = { - "mode": "VLAN", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_dual_band], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.fiveg -@pytest.mark.dual_band -class TestWifiCapacityVLANModeDualBand(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3687", name="WIFI-3687") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3688", name="WIFI-3688") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3689", name="WIFI-3689") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test vlan mode - pytest -m "wifi_capacity_test and VLAN and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3690", name="WIFI-3690") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and dual_band" - """ - profile_data = setup_params_general_dual_band["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_2G = { - "mode": "VLAN", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_2G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.twog -@pytest.mark.twog_band -class TestWifiCapacityVLANMode2G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3650", name="WIFI-3650") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3656", name="WIFI-3656") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3666", name="WIFI-3666") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3660", name="WIFI-3660") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_twog, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and twog" - """ - profile_data = setup_params_general_2G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="2G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - -setup_params_general_5G = { - "mode": "VLAN", - "ssid_modes": { - "wpa_personal": [ - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"} - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_5G], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -@pytest.mark.wpa_personal -@pytest.mark.fiveg -@pytest.mark.fiveg_band -class TestWifiCapacityVLANMode5G(object): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and VLAN" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3652", name="WIFI-3652") - @pytest.mark.wpa_personal - @pytest.mark.tcp_download - def test_client_wpa_vlan_tcp_dl(self, get_vif_state, lf_tools, setup_profiles, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3657", name="WIFI-3657") - @pytest.mark.wpa_personal - @pytest.mark.udp_download - def test_client_wpa_vlan_udp_dl(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="0", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3667", name="WIFI-3667") - @pytest.mark.wpa_personal - @pytest.mark.tcp_bidirectional - def test_client_wpa_vlan_tcp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_tcp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3661", name="WIFI-3661") - @pytest.mark.wpa_personal - @pytest.mark.udp_bidirectional - def test_client_wpa_vlan_udp_bidirectional(self, get_vif_state, lf_tools, - lf_test, station_names_fiveg, create_lanforge_chamberview_dut, - get_configuration): - """ Wifi Capacity Test VLAN mode - pytest -m "wifi_capacity_test and vlan and wpa_personal and fiveg" - """ - profile_data = setup_params_general_5G["ssid_modes"]["wpa_personal"][0] - ssid_name = profile_data["ssid_name"] - mode = "VLAN" - vlan = 100 - 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") - lf_tools.add_stations(band="5G", num_stations="max", dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa_VLAN_udp_bi", mode=mode, vlan_id=vlan, - download_rate="1Gbps", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True \ No newline at end of file diff --git a/tests/e2e/basic/test_access_point.py b/tests/e2e/basic/test_access_point.py index 8ddeac341..b2d872f28 100644 --- a/tests/e2e/basic/test_access_point.py +++ b/tests/e2e/basic/test_access_point.py @@ -1,99 +1,135 @@ -import time - -import allure -import pytest - - -@pytest.mark.uc_sanity -@allure.feature("SDK REST API") -@pytest.mark.gateway_ap_api -class TestAP(object): - - def test_ap_reboot(self, setup_controller, get_configuration, get_apnos): - for ap in get_configuration['access_point']: - cmd = "uci show ucentral" - print(get_configuration['access_point']) - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - gw = ap_ssh.run_generic_command(cmd) - print("Status:") - print(gw) - connected, latest, active = ap_ssh.get_ucentral_status() - print("Connected:") - print(connected) - iwinfo = ap_ssh.get_iwinfo() - print("iwinfo:") - print(iwinfo) - allure.attach(name="Status before reboot(Uci show ucentral):", body=str(gw)) - allure.attach(name="Status before reboot(ubus call ucentral status):", body=str(connected)) - allure.attach(name="Status before reboot(iwinfo):", body=str(iwinfo)) - device_name = get_configuration['access_point'][0]['serial'] - payload = { - "serialNumber": device_name, - "when": 0 - } - resp = setup_controller.ap_reboot(device_name, payload) - time.sleep(150) - print(resp.json()) - allure.attach(name="Reboot", body=str(resp.json()), attachment_type=allure.attachment_type.JSON) - for ap in get_configuration['access_point']: - cmd = "uci show ucentral" - print(get_configuration['access_point']) - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - gw1 = ap_ssh.run_generic_command(cmd) - print("Status:") - print(gw1) - connected1, latest1, active1 = ap_ssh.get_ucentral_status() - print("Connected1:") - print(connected1) - iwinfo1 = ap_ssh.get_iwinfo() - print("iwinfo1:") - print(iwinfo1) - allure.attach(name="Status after reboot(Uci show ucentral):", body=str(gw1)) - allure.attach(name="Status after reboot(ubus call ucentral status):", body=str(connected1)) - allure.attach(name="Status after reboot(iwinfo):", body=str(iwinfo1)) - assert (resp.status_code == 200) & (gw == gw1) & (connected == connected1) & (iwinfo == iwinfo1) - - def test_ap_factory_reset(self, setup_controller, get_configuration, get_apnos): - for ap in get_configuration['access_point']: - cmd = "uci show ucentral" - print(get_configuration['access_point']) - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - gw = ap_ssh.run_generic_command(cmd) - print("Status:") - print(gw) - connected, latest, active = ap_ssh.get_ucentral_status() - print("Connected:") - print(connected) - iwinfo = ap_ssh.get_iwinfo() - print("iwinfo:") - print(iwinfo) - allure.attach(name="Status before factory reset(Uci show ucentral):", body=str(gw)) - allure.attach(name="Status before factory reset(ubus call ucentral status):", body=str(connected)) - allure.attach(name="Status before factory reset(iwinfo):", body=str(iwinfo)) - device_name = get_configuration['access_point'][0]['serial'] - payload = { - "serialNumber": device_name, - "when": 0, - "keepRedirector": True - } - resp = setup_controller.ap_factory_reset(device_name, payload) - time.sleep(200) - print(resp.json()) - allure.attach(name="Factory Reset", body=str(resp.json()), attachment_type=allure.attachment_type.JSON) - for ap in get_configuration['access_point']: - cmd = "uci show ucentral" - print(get_configuration['access_point']) - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - gw1 = ap_ssh.run_generic_command(cmd) - print("Status:") - print(gw1) - connected1, latest1, active1 = ap_ssh.get_ucentral_status() - print("Connected1:") - print(connected1) - iwinfo1 = ap_ssh.get_iwinfo() - print("iwinfo1:") - print(iwinfo1) - allure.attach(name="Status after factory reset(Uci show ucentral):", body=str(gw1)) - allure.attach(name="Status after factory reset(ubus call ucentral status):", body=str(connected1)) - allure.attach(name="Status after factory reset(iwinfo):", body=str(iwinfo1)) - assert (resp.status_code == 200) & (gw == gw1) & (connected == connected1) & (iwinfo == iwinfo1) \ No newline at end of file +# import time +# +# import allure +# import pytest +# +# +# @pytest.mark.uc_sanity +# @allure.feature("SDK REST API") +# @pytest.mark.gateway_ap_api +# class TestAP(object): +# +# def test_ap_reboot(self, setup_controller, get_configuration, get_apnos): +# for ap in get_configuration['access_point']: +# cmd = "uci show ucentral" +# print(get_configuration['access_point']) +# ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") +# gw = ap_ssh.run_generic_command(cmd) +# print("Status:") +# print(gw) +# connected, latest, active = ap_ssh.get_ucentral_status() +# print("Connected:") +# print(connected) +# iwinfo = ap_ssh.get_iwinfo() +# print("iwinfo:") +# print(iwinfo) +# allure.attach(name="Status before reboot(Uci show ucentral):", body=str(gw)) +# allure.attach(name="Status before reboot(ubus call ucentral status):", body=str(connected)) +# allure.attach(name="Status before reboot(iwinfo):", body=str(iwinfo)) +# device_name = get_configuration['access_point'][0]['serial'] +# payload = { +# "serialNumber": device_name, +# "when": 0 +# } +# resp = setup_controller.ap_reboot(device_name, payload) +# time.sleep(150) +# print(resp.json()) +# allure.attach(name="Reboot", body=str(resp.json()), attachment_type=allure.attachment_type.JSON) +# for ap in get_configuration['access_point']: +# cmd = "uci show ucentral" +# print(get_configuration['access_point']) +# ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") +# gw1 = ap_ssh.run_generic_command(cmd) +# print("Status:") +# print(gw1) +# connected1, latest1, active1 = ap_ssh.get_ucentral_status() +# print("Connected1:") +# print(connected1) +# iwinfo1 = ap_ssh.get_iwinfo() +# print("iwinfo1:") +# print(iwinfo1) +# allure.attach(name="Status after reboot(Uci show ucentral):", body=str(gw1)) +# allure.attach(name="Status after reboot(ubus call ucentral status):", body=str(connected1)) +# allure.attach(name="Status after reboot(iwinfo):", body=str(iwinfo1)) +# assert (resp.status_code == 200) & (gw == gw1) & (connected == connected1) & (iwinfo == iwinfo1) +# +# def test_ap_factory_reset(self, setup_controller, get_configuration, get_apnos): +# for ap in get_configuration['access_point']: +# cmd = "uci show ucentral" +# print(get_configuration['access_point']) +# ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") +# gw = ap_ssh.run_generic_command(cmd) +# print("Status:") +# print(gw) +# connected, latest, active = ap_ssh.get_ucentral_status() +# print("Connected:") +# print(connected) +# iwinfo = ap_ssh.get_iwinfo() +# print("iwinfo:") +# print(iwinfo) +# allure.attach(name="Status before factory reset(Uci show ucentral):", body=str(gw)) +# allure.attach(name="Status before factory reset(ubus call ucentral status):", body=str(connected)) +# allure.attach(name="Status before factory reset(iwinfo):", body=str(iwinfo)) +# device_name = get_configuration['access_point'][0]['serial'] +# payload = { +# "serialNumber": device_name, +# "when": 0, +# "keepRedirector": True +# } +# resp = setup_controller.ap_factory_reset(device_name, payload) +# time.sleep(200) +# print(resp.json()) +# allure.attach(name="Factory Reset", body=str(resp.json()), attachment_type=allure.attachment_type.JSON) +# for ap in get_configuration['access_point']: +# cmd = "uci show ucentral" +# print(get_configuration['access_point']) +# ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") +# gw1 = ap_ssh.run_generic_command(cmd) +# print("Status:") +# print(gw1) +# connected1, latest1, active1 = ap_ssh.get_ucentral_status() +# print("Connected1:") +# print(connected1) +# iwinfo1 = ap_ssh.get_iwinfo() +# print("iwinfo1:") +# print(iwinfo1) +# allure.attach(name="Status after factory reset(Uci show ucentral):", body=str(gw1)) +# allure.attach(name="Status after factory reset(ubus call ucentral status):", body=str(connected1)) +# allure.attach(name="Status after factory reset(iwinfo):", body=str(iwinfo1)) +# assert (resp.status_code == 200) & (gw == gw1) & (connected == connected1) & (iwinfo == iwinfo1) +# +# +# setup_params_general = { +# "mode": "BRIDGE", +# "ssid_modes": { +# "open": [{"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], +# "security_key": "something"}], +# "wpa": [{"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], +# "security_key": "something"}], +# "wpa2_personal": [ +# {"ssid_name": "ssid_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, +# {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], +# "security_key": "something"}]}, +# "rf": {}, +# "radius": False +# } +# +# +# @pytest.mark.shivam +# @pytest.mark.parametrize( +# 'setup_configuration', +# [setup_params_general], +# indirect=True, +# scope="class" +# ) +# @pytest.mark.usefixtures("setup_configuration") +# @pytest.mark.open +# @pytest.mark.twog +# @pytest.mark.wpa +# @pytest.mark.twog +# @pytest.mark.wpa2_personal +# @pytest.mark.fiveg +# def test_abc(): +# assert True diff --git a/tests/e2e/basic/test_e2e_sdk_ap_tests.py b/tests/e2e/basic/test_e2e_sdk_ap_tests.py index a0363a319..65ee19a63 100644 --- a/tests/e2e/basic/test_e2e_sdk_ap_tests.py +++ b/tests/e2e/basic/test_e2e_sdk_ap_tests.py @@ -1,205 +1,205 @@ -import sys -import time -from datetime import datetime - -import allure -import pytest - -setup_params = [ - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk"}, - {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk"}], - "radius": False - }, - - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2"}, - {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"}], - "radius": False - }, - - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae"}, - {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae"}], - "radius": False - }, - - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none"}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none"}], - "radius": False - }, - - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2"}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa2"}], - "radius": True - }, - - { - "mode": "BRIDGE", - "ssids": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3"}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa3"}], - "radius": True - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk"}, - {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk"}], - "radius": False - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2"}, - {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"}], - "radius": False - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae"}, - {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae"}], - "radius": False - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none"}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none"}], - "radius": False - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2"}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa2"}], - "radius": True - }, - - { - "mode": "NAT", - "ssids": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3"}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa3"}], - "radius": True - }, - ########## -{ - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk", "vlan": 100}, - {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk", "vlan": 100}], - "radius": False - }, - - { - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2", "vlan": 100}, - {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2", "vlan": 100}], - "radius": False - }, - - { - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae", "vlan": 100}, - {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae", "vlan": 100}], - "radius": False - }, - - { - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none", "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none", "vlan": 100}], - "radius": False - }, - - { - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2", "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa2", "vlan": 100}], - "radius": True - }, - - { - "mode": "VLAN", - "ssids": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3", "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", - "security": "wpa3", "vlan": 100}], - "radius": True - }, - -] - - -@pytest.mark.ow_config_load_test -@pytest.mark.ow_sdk_load_tests -@allure.parent_suite("OpenWifi SDK E2E Tests") -@allure.parent_suite("OpenWifi Gateway E2E Configuration Test") -class TestBulkConfigTest(object): - - @allure.sub_suite("Back to Back config Apply test on single AP") - def test_config_apply_test(self, setup_controller, instantiate_profile, get_configuration, radius_info, - radius_accounting_info): - """ - Test the system endpoints to verify list of services present - WIFI-3449 - """ - PASS = [] - SERIAL = get_configuration["access_point"][0]["serial"] - for i in range(0, 100): - for config in setup_params: - profile_obj = instantiate_profile(sdk_client=setup_controller) - profile_obj.set_mode(config["mode"]) - profile_obj.set_radio_config() - radius = config["radius"] - for ssid in config["ssids"]: - if radius: - profile_obj.add_ssid(ssid_data=ssid, radius=radius, radius_auth_data=radius_info, - radius_accounting_data=radius_accounting_info) - else: - profile_obj.add_ssid(ssid_data=ssid) - status = profile_obj.push_config(serial_number=SERIAL) - if status.status_code != 200: - allure.attach("Configure command Failed: ", SERIAL, " Time: " + str(datetime.utcnow())) - print(str(status.status_code) + ":\t" + str(status.json())) - allure.attach(name=str(status.status_code), body=str(status.json())) - print("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) - PASS.append(False) - if status.status_code == 200: - print(str(status.status_code) + ":\t" + str(status.json())) - allure.attach(name=str(status.status_code), body=str(status.json())) - allure.attach("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) - print("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) - PASS.append(True) - print("Sleeping 30 Sec before Next Config") - time.sleep(30) - - assert False not in PASS +# import sys +# import time +# from datetime import datetime +# +# import allure +# import pytest +# +# setup_params = [ +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk"}, +# {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk"}], +# "radius": False +# }, +# +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2"}, +# {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"}], +# "radius": False +# }, +# +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae"}, +# {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae"}], +# "radius": False +# }, +# +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none"}, +# {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none"}], +# "radius": False +# }, +# +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2"}, +# {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa2"}], +# "radius": True +# }, +# +# { +# "mode": "BRIDGE", +# "ssids": [ +# {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3"}, +# {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa3"}], +# "radius": True +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk"}, +# {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk"}], +# "radius": False +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2"}, +# {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2"}], +# "radius": False +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae"}, +# {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae"}], +# "radius": False +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none"}, +# {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none"}], +# "radius": False +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2"}, +# {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa2"}], +# "radius": True +# }, +# +# { +# "mode": "NAT", +# "ssids": [ +# {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3"}, +# {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa3"}], +# "radius": True +# }, +# ########## +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_psk_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk", "vlan": 100}, +# {"ssid_name": "ssid_psk_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk", "vlan": 100}], +# "radius": False +# }, +# +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_psk2_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "psk2", "vlan": 100}, +# {"ssid_name": "ssid_psk2_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "psk2", "vlan": 100}], +# "radius": False +# }, +# +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_sae_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "sae", "vlan": 100}, +# {"ssid_name": "ssid_sae_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "sae", "vlan": 100}], +# "radius": False +# }, +# +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "none", "vlan": 100}, +# {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "security_key": "something", "security": "none", "vlan": 100}], +# "radius": False +# }, +# +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa2", "vlan": 100}, +# {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa2", "vlan": 100}], +# "radius": True +# }, +# +# { +# "mode": "VLAN", +# "ssids": [ +# {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something", "security": "wpa3", "vlan": 100}, +# {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something", +# "security": "wpa3", "vlan": 100}], +# "radius": True +# }, +# +# ] +# +# +# @pytest.mark.ow_config_load_test +# @pytest.mark.ow_sdk_load_tests +# @allure.parent_suite("OpenWifi SDK E2E Tests") +# @allure.parent_suite("OpenWifi Gateway E2E Configuration Test") +# class TestBulkConfigTest(object): +# +# @allure.sub_suite("Back to Back config Apply test on single AP") +# def test_config_apply_test(self, setup_controller, instantiate_profile, get_configuration, radius_info, +# radius_accounting_info): +# """ +# Test the system endpoints to verify list of services present +# WIFI-3449 +# """ +# PASS = [] +# SERIAL = get_configuration["access_point"][0]["serial"] +# for i in range(0, 100): +# for config in setup_params: +# profile_obj = instantiate_profile(sdk_client=setup_controller) +# profile_obj.set_mode(config["mode"]) +# profile_obj.set_radio_config() +# radius = config["radius"] +# for ssid in config["ssids"]: +# if radius: +# profile_obj.add_ssid(ssid_data=ssid, radius=radius, radius_auth_data=radius_info, +# radius_accounting_data=radius_accounting_info) +# else: +# profile_obj.add_ssid(ssid_data=ssid) +# status = profile_obj.push_config(serial_number=SERIAL) +# if status.status_code != 200: +# allure.attach("Configure command Failed: ", SERIAL, " Time: " + str(datetime.utcnow())) +# print(str(status.status_code) + ":\t" + str(status.json())) +# allure.attach(name=str(status.status_code), body=str(status.json())) +# print("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) +# PASS.append(False) +# if status.status_code == 200: +# print(str(status.status_code) + ":\t" + str(status.json())) +# allure.attach(name=str(status.status_code), body=str(status.json())) +# allure.attach("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) +# print("Configure command success: ", SERIAL, " Time: " + str(datetime.utcnow())) +# PASS.append(True) +# print("Sleeping 30 Sec before Next Config") +# time.sleep(30) +# +# assert False not in PASS diff --git a/tests/e2e/basic/test_firmware.py b/tests/e2e/basic/test_firmware.py index 15303d960..9911fcb8c 100644 --- a/tests/e2e/basic/test_firmware.py +++ b/tests/e2e/basic/test_firmware.py @@ -1,57 +1,57 @@ -""" - Test Case Module: setup test cases for basic test cases - Details: Firmware Upgrade - -""" -import allure -import pytest - -pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_light, - pytest.mark.usefixtures("setup_test_run")] - - -@allure.testcase("firmware upgrade from Cloud") -@pytest.mark.firmware_cloud -class TestFirmware(object): - - @pytest.mark.firmware_create - def test_firmware_create(self, upload_firmware, update_report, test_cases): - if upload_firmware != 0: - PASS = True - else: - PASS = False - assert PASS - - @pytest.mark.firmware_upgrade - def test_firmware_upgrade_request(self, upgrade_firmware, update_report, test_cases): - print(upgrade_firmware) - if not upgrade_firmware: - PASS = False - else: - PASS = True - assert PASS - - @pytest.mark.check_active_firmware_cloud - def test_active_version_cloud(self, get_latest_firmware, get_equipment_ref, setup_controller, - update_report, test_cases): - ap_fw_list = [] - for i in get_equipment_ref: - ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i)) - - assert get_latest_firmware == ap_fw_list - - -@pytest.mark.firmware_ap -def test_ap_firmware(get_configuration, get_apnos, get_latest_firmware, update_report, - test_cases): - """yields the active version of firmware on ap""" - active_fw_list = [] - try: - for access_point in get_configuration['access_point']: - ap_ssh = get_apnos(access_point, sdk="1.x") - active_fw = ap_ssh.get_active_firmware() - active_fw_list.append(active_fw) - except Exception as e: - print(e) - active_fw_list = [] - assert active_fw_list == get_latest_firmware +# """ +# Test Case Module: setup test cases for basic test cases +# Details: Firmware Upgrade +# +# """ +# import allure +# import pytest +# +# pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_light, +# pytest.mark.usefixtures("setup_test_run")] +# +# +# @allure.testcase("firmware upgrade from Cloud") +# @pytest.mark.firmware_cloud +# class TestFirmware(object): +# +# @pytest.mark.firmware_create +# def test_firmware_create(self, upload_firmware, update_report, test_cases): +# if upload_firmware != 0: +# PASS = True +# else: +# PASS = False +# assert PASS +# +# @pytest.mark.firmware_upgrade +# def test_firmware_upgrade_request(self, upgrade_firmware, update_report, test_cases): +# print(upgrade_firmware) +# if not upgrade_firmware: +# PASS = False +# else: +# PASS = True +# assert PASS +# +# @pytest.mark.check_active_firmware_cloud +# def test_active_version_cloud(self, get_latest_firmware, get_equipment_ref, setup_controller, +# update_report, test_cases): +# ap_fw_list = [] +# for i in get_equipment_ref: +# ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i)) +# +# assert get_latest_firmware == ap_fw_list +# +# +# @pytest.mark.firmware_ap +# def test_ap_firmware(get_configuration, get_apnos, get_latest_firmware, update_report, +# test_cases): +# """yields the active version of firmware on ap""" +# active_fw_list = [] +# try: +# for access_point in get_configuration['access_point']: +# ap_ssh = get_apnos(access_point, sdk="1.x") +# active_fw = ap_ssh.get_active_firmware() +# active_fw_list.append(active_fw) +# except Exception as e: +# print(e) +# active_fw_list = [] +# assert active_fw_list == get_latest_firmware diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py index 242e07776..cf696e97a 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py @@ -1,226 +1,249 @@ import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, pytest.mark.ow_sanity_lf, +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.ow_sanity_lf, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.uc_sanity] setup_params_enterprise = { "mode": "BRIDGE", "ssid_modes": { "wpa_enterprise": [ - {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], "wpa2_enterprise": [ - {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], "wpa3_enterprise": [ - {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": True } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP TLS Client Connectivity : Suite-A") +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) @pytest.mark.uc_sanity -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeEnterpriseTLSSuiteA(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and tls" + pytest -m "client_connectivity_tests and bridge and enterprise and tls" """ @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_tls_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA-Enterprise-TLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3742", name="WIFI-3742") + def test_tls_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 2G radio connects to AP in Bridge mode with WPA enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_enterprise and ow_sanity_lf and tls and bridge and twog" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "twog" - print("output of get_ap_channel ", get_ap_channel) - channel = get_ap_channel[0]["2G"] - print("ssid 2G channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radcius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_tls_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA-Enterprise-TLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3743", name="WIFI-3743") + def test_tls_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 5G radio connects to AP in Bridge mode with WPA enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_enterprise and ow_sanity_lf and tls and bridge and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "fiveg" - print("output of get_ap_channel ", get_ap_channel) - channel = get_ap_channel[0]["5G"] - print("ssid 5G channel:- ", channel) - vlan = 100 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radcius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_tls_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA2-Enterprise-TLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3739", name="WIFI-3739") + def test_tls_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 2G radio connects to AP in Bridge mode with WPA2 enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa2_enterprise and ow_sanity_lf and tls and bridge and twog" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_tls_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA2-Enterprise-TLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3713", name="WIFI-3713") + def test_tls_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 5G radio connects to AP in Bridge mode with WAP2 enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa2_enterprise and ow_sanity_lf and tls and bridge and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "BRIDGE" band = "fiveg" - print("output of get_ap_channel ", get_ap_channel) - channel = get_ap_channel[0]["5G"] - vlan = 100 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_tls_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA3-Enterprise-TLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3736", name="WIFI-3736") + def test_tls_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 2G radio connects to AP in Bridge mode with WPA3 enterprise TLS security + Unique Marker: pytest -m "To verify that a client created on 2G radio connects to AP in Bridge mode with WPA3 enterprise TLS security" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_tls_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - """ wpa enterprise 5g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" + @allure.title("Bridge Mode Client Connectivity Test with WPA3-Enterprise-TLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3734", name="WIFI-3734") + def test_tls_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a client created on 5G radio connects to AP in Bridge mode with WPA3 enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa3_enterprise and ow_sanity_lf and tls and bridge and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @@ -240,125 +263,139 @@ setup_params_enterprise_two = { } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP TLS Client Connectivity : Suite-B") +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-B") @pytest.mark.suiteB @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeEnterpriseTLSSuiteTwo(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and suiteB" """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + @allure.title("Bridge Mode Client Connectivity Test with WAP-WPA2-Enterprise-TLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10589", name="WIFI-10589") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + To verify that a client created on 2G radio connects to AP in Bridge mode with WAP-WPA2-Enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and wpa_wpa2_enterprise_mixed and enterprise and ow_sanity_lf and tls and bridge and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + @allure.title("Bridge Mode Client Connectivity Test with WAP-WPA2-Enterprise-TLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10590", name="WIFI-10590") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + To verify that a client created on 5G radio connects to AP in Bridge mode with WAP-WPA2-Enterprise TLS security + Unique Marker: pytest -m "client_connectivity_tests and wpa_wpa2_enterprise_mixed and enterprise and ow_sanity_lf and tls and bridge and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and twog" + @allure.title("Bridge Mode Client Connectivity Test with WAP3-Enterprise-Mixed-TLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10591", name="WIFI-10591") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + To verify that a client created on 2G radio connects to AP in Bridge mode with WAP3-Enterprise-Mixed TLS security + Unique Marker: pytest -m "client_connectivity_tests and wpa3_enterprise_mixed and enterprise and ow_sanity_lf and tls and bridge and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + @allure.title("Bridge Mode Client Connectivity Test with WAP3-Enterprise-Mixed-TLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10592", name="WIFI-10592") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + To verify that a client created on 5G radio connects to AP in Bridge mode with WAP3-Enterprise-Mixed TLS security + Unique Marker: pytest -m "client_connectivity_tests and wpa3_enterprise_mixed and enterprise and ow_sanity_lf and tls and bridge and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result 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 d1a5c126f..16af5f505 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 @@ -7,7 +7,7 @@ import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ttls, pytest.mark.ucentral, pytest.mark.sanity, pytest.mark.uc_sanity] setup_params_enterprise = { @@ -28,176 +28,181 @@ setup_params_enterprise = { } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP TTLS Client Connectivity : Suite-A") -@pytest.mark.suiteA +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeEnterpriseTTLSSuiteA(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteA" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and suiteA" """ @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa enterprise 2.4 GHz") + def test_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_enterprise and twog" + pytest -m "client_conclient_connectivity_testsnectivity and bridge and enterprise and ttls and wpa_enterprise and twog" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + profile_data = {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, station_names_fiveg, get_ap_logs, get_lf_logs, - lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa enterprise 5 GHz") + def test_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 5g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_enterprise and fiveg" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa_enterprise and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + profile_data = {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa2 enterprise 2.4 GHz") + def test_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa2_enterprise and twog" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa2_enterprise and twog" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + profile_data = {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa2 enterprise 5 GHz") + def test_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa2_enterprise and fiveg" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa2_enterprise and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + profile_data = {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa3 enterprise 2.4 GHz") + def test_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise and twog" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa3_enterprise and twog" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + profile_data = {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa3 enterprise 5 GHz") + def test_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise and fiveg" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa3_enterprise and fiveg" """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + profile_data = {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @@ -217,124 +222,126 @@ setup_params_enterprise_two = { } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP TTLS Client Connectivity : Suite-B") -@pytest.mark.suiteB +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-B") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeEnterpriseTTLSSuiteTwo(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and suiteB" """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa wpa2 enterprise 2.4 GHz") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa wpa2 enterprise 5 GHz") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + pytest -m "client_connclient_connectivity_testsectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): + @allure.title("Test for wpa3 enterprise mixed 2.4 GHz") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and twog" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa3_enterprise_mixed and twog" """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): + @allure.title("Test for wpa3 enterprise mixed 5 GHz") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and wpa3_enterprise_mixed and fiveg" """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result 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 6cbb5615a..4e66e1930 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 @@ -1,459 +1,407 @@ """ - Client Connectivity and tcp-udp Traffic Test: Bridge Mode - pytest -m "client_connectivity and bridge and general" + Client Connectivity and tcp-udp Traffic Test: BRIDGE Mode + pytest -m "client_connectivity_tests and nat and general" """ +import logging import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, pytest.mark.bridge, pytest.mark.general, pytest.mark.ucentral, - pytest.mark.sanity, pytest.mark.uc_sanity] # pytest.mark.usefixtures("setup_test_run")] +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.bridge, pytest.mark.general] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "open": [{"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], "wpa": [{"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], - "security_key": "something"}]}, + {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.sudo -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeConnectivitySuiteA(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and bridge and general and suiteA" + """ + Bridge Client Connectivity (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connectivity_tests and bridge and general" """ @pytest.mark.open @pytest.mark.twog + @allure.story('OPEN 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with open encryption 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") - def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, - update_report, - station_names_twog, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and open and twog" + def test_bridge_open_2g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, + setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["open"][0] + BRIDGE Mode Client Connectivity Test with open encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and open and twog" + """ + profile_data = {"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = "[BLANK]" security = "open" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.open @pytest.mark.fiveg + @allure.story('OPEN 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with open encryption 5 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_open_ssid_5g(self, get_ap_logs, lf_test, test_cases, station_names_fiveg, get_lf_logs, - update_report, get_ap_channel): - """Client Connectivity open ssid 5G - pytest -m "client_connectivity and bridge and general and open and fiveg" + def test_bridge_open_5g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + BRIDGE Mode Client Connectivity Test with open encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and open and fiveg" + """ + profile_data = {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = "[BLANK]" security = "open" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light + # + @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa encryption 2.4 GHz Band") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_wpa_ssid_2g(self, get_ap_logs, update_report, get_lf_logs, - lf_test, test_cases, station_names_twog, get_ap_channel): - """Client Connectivity wpa ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa and twog" + def test_bridge_wpa_2g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + BRIDGE Mode Client Connectivity Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_ap_logs, lf_test, update_report, get_lf_logs, - test_cases, station_names_fiveg, get_ap_channel): - """Client Connectivity wpa ssid 5G - pytest -m "client_connectivity and bridge and general and wpa and fiveg" + @allure.title("BRIDGE Mode Client Connectivity Test with wpa encryption 5 GHz Band") + def test_bridge_wpa_5g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + BRIDGE Mode Client Connectivity Test with wpa encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, test_cases, - station_names_twog, get_ap_channel): - """Client Connectivity wpa2_personal ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa2_personal and twog" + @allure.title("BRIDGE Mode Client Connectivity Test with wpa2_personal encryption 2.4 GHz Band") + def test_bridge_wpa2_personal_2g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + BRIDGE Mode Client Connectivity Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light + # + @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_ap_logs, update_report, test_cases, - station_names_fiveg, get_lf_logs, - lf_test, get_ap_channel): - """Client Connectivity wpa2_personal ssid 5G - pytest -m "client_connectivity and bridge and general and wpa2_personal and fiveg" + @allure.title("BRIDGE Mode Client Connectivity Test with wpa2_personal encryption 5 GHz Band") + def test_bridge_wpa2_personal_5g_client_connectivity(self, get_test_library, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + BRIDGE Mode Client Connectivity Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result -setup_params_general_two = { +setup_params_general_two_br = { "mode": "BRIDGE", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_wpa3_p_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_br", "appliedRadios": ["5G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_6g_br", "appliedRadios": ["6G"], "security_key": "something"}], "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_wpa3_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}] }, "rf": {}, "radius": False } -@allure.suite(suite_name="OpenWifi Sanity LF") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B") -@pytest.mark.suiteB -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], + 'setup_configuration', + [setup_params_general_two_br], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestBridgeModeConnectivitySuiteTwo(object): """ Client Connectivity SuiteA - pytest -m "client_connectivity and bridge and suiteB" + pytest -m "client_connectivity_tests and bridge and suiteB" """ @pytest.mark.wpa3_personal @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_ap_logs, station_names_twog, lf_test, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa3_personal and twog" + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 2.4 GHz Band") + def test_bridge_wpa3_personal_2g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.wpa3_personal @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_ap_logs, station_names_fiveg, - lf_test, test_cases, get_lf_logs, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa3_personal and fiveg" + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 5 GHz Band") + def test_bridge_wpa3_personal_5g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) - assert result + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @allure.story('wpa3_personal 6 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 6 GHz Band") + def test_bridge_wpa3_personal_6g_client_connectivity(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, check_connectivity, setup_configuration): + """ + BRIDGE Mode Client Connectivity Test with wpa3_personal encryption 6 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_6g_br", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + band = "sixg" + mode = "BRIDGE" + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + + assert passes == "PASS", result @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, station_names_twog, - lf_test, get_lf_logs, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa3_personal_mixed and twog" + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa3_personal_mixed encryption 2.4 GHz Band") + def test_bridge_wpa3_personal_mixed_2g_client_connectivity(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + BRIDGE Mode Client Connectivity Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa3_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, station_names_fiveg, lf_test, - test_cases, get_lf_logs, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa3_personal_mixed and fiveg" + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connectivity Test with wpa3_personal_mixed encryption 5 GHz Band") + def test_bridge_wpa3_personal_mixed_5g_client_connectivity(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + BRIDGE Mode Client Connectivity Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa3_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @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_ap_logs, station_names_twog, - lf_test, get_lf_logs, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and twog" + @allure.title("BRIDGE Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + def test_bridge_wpa_wpa2_personal_mixed_2g_client_connectivity(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + BRIDGE Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @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_ap_logs, station_names_fiveg, get_lf_logs, - lf_test, test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and fiveg" + @allure.title("BRIDGE Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + def test_bridge_wpa_wpa2_personal_mixed_5g_client_connectivity(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + BRIDGE Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "client_connectivity_tests and bridge and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] mode = "BRIDGE" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) - assert passes == "PASS", result -# WEP Security Feature not available -# setup_params_wep = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["2G"], "default_key_id": 1, -# "wep_key": 1234567890}, -# {"ssid_name": "ssid_wep_5g", "appliedRadios": ["5G"], -# "default_key_id": 1, "wep_key": 1234567890}] -# }, -# "rf": {}, -# "radius": True -# } -# -# -# @pytest.mark.enterprise -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_wep], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# class TestBridgeModeWEP(object): -# -# @pytest.mark.wep -# @pytest.mark.twog -# def test_wep_2g(self, get_vif_state,station_names_twog, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][0] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "BRIDGE" -# band = "twog" -# vlan = 1 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_twog, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - bridge mode' + str( -# passes)) -# assert passes -# -# @pytest.mark.wep -# @pytest.mark.fiveg -# def test_wep_5g(self, get_vif_state,station_names_fiveg, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][1] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "BRIDGE" -# band = "twog" -# vlan = 1 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_fiveg, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_bridge"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - bridge mode' + str( -# passes)) -# assert passes + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + + assert passes == "PASS", result diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py index fac2c3245..0eea62950 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py @@ -4,35 +4,31 @@ pytest -m "multipsk and wpa2_personal and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports wifi-3493 """ -import time - import allure import pytest -pytestmark = [pytest.mark.ow_regression_lf, +pytestmark = [pytest.mark.multi_psk_tests, + pytest.mark.bridge, + pytest.mark.wpa2_personal, pytest.mark.ow_sanity_lf, - pytest.mark.ow_multipsk_tests_lf, - pytest.mark.bridge] + pytest.mark.twog] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "wpa2_personal": [ - {"ssid_name": "MDU Wi-Fi", + {"ssid_name": "MDU-Wi-Fi-2g", "appliedRadios": ["2G"], "security": "psk2", - "security_key": "something", + "security_key": "OpenWifi", "multi-psk": [ { - "key": "lanforge1", + "key": "OpenWifi1", "vlan-id": 100 }, { - "key": "lanforge2", + "key": "OpenWifi2", "vlan-id": 200 - }, - { - "key": "lanforge3" } ], }]}, @@ -41,88 +37,92 @@ setup_params_general = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") +@allure.feature("MultiPsk Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): +@allure.parent_suite("MultiPsk Test") +@allure.suite("BRIDGE Mode") +@allure.sub_suite("WPA2 Security") +@pytest.mark.usefixtures("setup_configuration") +class TestMultipskBridgeWPA2(object): - @pytest.mark.multipsk - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.twogvlan1 + @pytest.mark.vlan1 + @pytest.mark.ow_sanity_lf + @pytest.mark.wpa2 @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493") - def test_client_wpa2_2g_vlan1(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - lf_tools.reset_scenario() - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @allure.title("Test for Client Connect with 1 VLAN") + def test_client_wpa2_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify a client operating on BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not. + pytest -m "ow_sanity_lf and vlan1 and wpa2 and multipsk" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) security = "wpa2" mode = "BRIDGE" band = "twog" - vlan = 1 - # create vlan - lf_tools.add_vlan(vlan_ids=[int(vlan_id[0])]) - time.sleep(10) - station_name = [] - station_name.append("sta" + str(vlan_id[0])) - station_name.append("sta00") - print(station_name) - allure.attach(name="multipsk-config", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][0]["multi-psk"])) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa2", mode="BRIDGE", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, station_name=station_name, n_vlan="1") - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}} - @pytest.mark.multipsk - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.twogvlan2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493") - def test_client_wpa2_2g_vlan2(self, lf_test, lf_tools): + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - print(profile_data) - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @pytest.mark.vlan2 + @pytest.mark.ow_sanity_lf + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10657", name="WIFI-10657") + @allure.title("Test for Client Connect with 2 VLAN's") + def test_client_wpa2_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify a client operating on BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not. + pytest -m "multi_psk_tests and bridge and wpa2_personal and vlan2 and twog" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - vlan_id.append(profile_data["multi-psk"][1]['vlan-id']) - security = "wpa2" mode = "BRIDGE" band = "twog" - vlan = 1 - # create vlan - station_name = [] - for i in vlan_id: - lf_tools.add_vlan(vlan_ids=[int(i)]) - station_name.append("sta" + str(i)) - time.sleep(10) - - station_name.append("sta00") - print(station_name) - allure.attach(name="multipsk-config", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][0]["multi-psk"])) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa2", mode="BRIDGE", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, - station_name=station_name, n_vlan="2", key3=key3) - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}, + 200: {"num_stations": 1, "passkey": profile_data["multi-psk"][1]["key"]}} + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True \ No newline at end of file diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py index 381b8c182..dbd2fcfc7 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py @@ -1,40 +1,34 @@ """ Performance Test: Multi-psk Test: Bridge Mode - pytest -m "multipsk and wpa and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports - wifi-3492 + pytest -m "multipsk and wpa_personal and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports + wifi-3493 """ -import os -import time - -import pytest import allure +import pytest -pytestmark = [pytest.mark.ow_regression_lf, +pytestmark = [pytest.mark.multi_psk_tests, + pytest.mark.bridge, + pytest.mark.wpa, pytest.mark.ow_sanity_lf, - pytest.mark.ow_multipsk_tests_lf, - pytest.mark.bridge] - + pytest.mark.twog] setup_params_general = { "mode": "BRIDGE", "ssid_modes": { "wpa": [ - {"ssid_name": "MDU Wi-Fi", + {"ssid_name": "MDU-Wi-Fi-2g", "appliedRadios": ["2G"], - "security": "psk", - "security_key": "something", + "security": "psk2", + "security_key": "OpenWifi", "multi-psk": [ { - "key": "lanforge1", + "key": "OpenWifi1", "vlan-id": 100 }, { - "key": "lanforge2", + "key": "OpenWifi2", "vlan-id": 200 - }, - { - "key": "lanforge3" } ], }]}, @@ -43,88 +37,93 @@ setup_params_general = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") +@allure.feature("MultiPsk Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): +@allure.parent_suite("MultiPsk Test") +@allure.suite("BRIDGE Mode") +@allure.sub_suite("WPA Security") +@pytest.mark.usefixtures("setup_configuration") +class TestMultipskBridgeWPA(object): - @pytest.mark.multipsk - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.twogvlan1 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3492", name="WIFI-3492") - def test_client_wpa_2g_vlan1(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - lf_tools.reset_scenario() - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @pytest.mark.vlan1 + @pytest.mark.ow_sanity_lf + @pytest.mark.bridgemode + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493") + @allure.title("Test for Client Connect with 1 VLAN") + def test_client_wpa_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify a client operating on BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not + pytest -m "ow_sanity_lf and vlan1 and bridgemode" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) security = "wpa" mode = "BRIDGE" band = "twog" - # create vlan - lf_tools.add_vlan(vlan_ids=[int(vlan_id[0])]) - time.sleep(10) - station_name = [] - station_name.append("sta" + str(vlan_id[0])) - station_name.append("sta00") - print(station_name) - allure.attach(name="multipsk-config", body=str(setup_params_general["ssid_modes"]["wpa"][0]["multi-psk"])) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa", mode="BRIDGE", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, station_name=station_name, n_vlan="1") - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}} - @pytest.mark.multipsk - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.twogvlan2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3492", name="WIFI-3492") - def test_client_wpa_2g_vlan2(self, lf_test, lf_tools): + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - print(profile_data) - ssid_name = profile_data["ssid_name"] - print(ssid_name) + @pytest.mark.vlan2 + @pytest.mark.ow_sanity_lf + @pytest.mark.bridgemode + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10662", name="WIFI-10662") + @allure.title("Test for Client Connect with 2 VLAN's") + def test_client_wpa_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + to verify a client operating on BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not + pytest -m "ow_sanity_lf and vlan2 and bridgemode" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - vlan_id.append(profile_data["multi-psk"][1]['vlan-id']) - security = "wpa" mode = "BRIDGE" band = "twog" - # create vlan - station_name = [] - for i in vlan_id: - lf_tools.add_vlan(vlan_ids=[int(i)]) - station_name.append("sta" + str(i)) - time.sleep(10) - - - station_name.append("sta00") - print(station_name) - allure.attach(name="multipsk-config", body=str(setup_params_general["ssid_modes"]["wpa"][0]["multi-psk"])) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa", mode="BRIDGE", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, - station_name=station_name, n_vlan="2", key3=key3) - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" - + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}, + 200: {"num_stations": 1, "passkey": profile_data["multi-psk"][1]["key"]}} + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py index f3a3cdc1b..ee843d15b 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py @@ -5,8 +5,7 @@ Rate LImiting Bridge Mode Scenario import allure import pytest -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.bridge] +pytestmark = [pytest.mark.bridge, pytest.mark.rate_limiting_tests] setup_params_general = { "mode": "BRIDGE", @@ -16,16 +15,16 @@ setup_params_general = { "appliedRadios": ["2G"], "security_key": "something", "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }, {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something", "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }]}, "rf": {}, @@ -33,43 +32,51 @@ setup_params_general = { } -@allure.feature("Bridge MODE Rate Limiting") +@allure.feature("Rate Limiting Test") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite("BRIDGE Mode") +@allure.sub_suite("WPA2 Personal Security") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestRateLimitingBridge(object): @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.upload @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up and batch_size_125" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and upload and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @@ -77,29 +84,34 @@ class TestRateLimitingBridge(object): @pytest.mark.twog @pytest.mark.download @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and dw and batch_size_125" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_dw", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @@ -108,519 +120,643 @@ class TestRateLimitingBridge(object): @pytest.mark.upload_download @pytest.mark.ow_sanity_lf @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @pytest.mark.bridge + @allure.testcase(name="WIFI-3385", + url="https://telecominfraproject.atlassian.net/browse/WIFI-3385") + @allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + check_connectivity): """ - Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_dw and batch_size_125" + To verfiy a client operating with WPA2 Personal security can limit the UP & DW traffic or not. + pytest -m "rate_limiting_tests and wpa2_personal and bridge and ow_sanity_lf and twog and upload_download and batch_size_125" + """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_dw", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.disable_up_dw - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and disable_up_dw" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and disable_up_dw" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_dw_di", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw_di", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload and Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_dw_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and up_dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_bridge_up_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_bridge_up_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_ssid_up_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and up_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_per_cl", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_per_cl", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_ssid_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and dw_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up and batch_size_125" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and upload and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_125", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_125", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and dw and batch_size_125" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_125 @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_dw and batch_size_125" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and upload_download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and upload and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_1", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_1", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and dw and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl_dw_1", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and upload_download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl_up_dw_1", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_tcp_dl_up_dw_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and upload and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_1_5g", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and dw and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_ssid_up_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and upload_download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.disable_up_dw - def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and disable_up_dw" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and disable_up_dw" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_dw_di_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_dw_di_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_dw_per_client - def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_dw_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and up_dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_per_client - def test_wpa2_personal_ssid_up_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and up_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_up_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_up_per_cl_5g", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dw_per_client - def test_wpa2_personal_ssid_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and dw_per_client" + pytest -m "rate_limiting_tests and bridge and wpa2_personal and fiveg and dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "BRIDGE" - vlan = 1 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_dw_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_BRIDGE_dw_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py deleted file mode 100644 index 814ebfd86..000000000 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py +++ /dev/null @@ -1,959 +0,0 @@ -""" -Rate LImiting with radius Bridge Mode Scenario -""" - -import allure -import pytest -from configuration import RATE_LIMITING_RADIUS_SERVER_DATA -from configuration import RATE_LIMITING_RADIUS_ACCOUNTING_DATA - -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dynamic_qos_tests_lf, - pytest.mark.ow_rate_limiting_with_radius_tests_lf, - pytest.mark.bridge] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_2g_br", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 50, - "egress-rate": 50 - }, - "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, - "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA - - }, - {"ssid_name": "ssid_wpa2_5g_br", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 50, - "egress-rate": 50 - }, - "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, - "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA - } - ] - }, - "rf": {}, - "radius": False -} - - -@allure.feature("Bridge MODE Rate Limiting with radius server") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingWithRadiusBridge(object): - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.ow_sanity_lf - @pytest.mark.twog_upload_per_ssid - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5849", name="WIFI-5849") - def test_radius_server_2g_upload_per_ssid(self, lf_test, lf_tools, rate_radius_info, rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_up_per_ssid", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_download_perssid_persta - @pytest.mark.ow_sanity_lf - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5850", name="WIFI-5850") - def test_radius_server_2g_download_perssid_persta(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_down_perssid_persta", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_upload_persta_perclient - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5851", name="WIFI-5851") - def test_radius_server_2g_upload_persta_perclient_rate(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_up_per_per_client", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="2.488Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_upload_download_persta_perclient - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5852", name="WIFI-5852") - def test_radius_server_2g_upload_download_persta_perclient_rate(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_up_down_per_per_client", mode=mode, - vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_download_per_ssid - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5853", name="WIFI-5853") - def test_radius_server_fiveg_per_ssid_download(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_down_per_ssid", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_upload_per_ssid - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5854", name="WIFI-5854") - def test_radius_server_fiveg_per_ssid_upload(self, lf_test, lf_tools, rate_radius_info, rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_up_per_ssid", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_download_per_ssid_per_client - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5855", name="WIFI-5855") - def test_radius_server_fiveg_per_ssid_perclient_download(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_down_per_ssid_perclient", mode=mode, - vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_upstream_per_ssid_per_client - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5856", name="WIFI-5856") - def test_radius_server_fiveg_per_ssid_perclient_upstream(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_upstream_per_ssid_perclient", mode=mode, - vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_upstream__downstream_per_ssid_per_client - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5857", name="WIFI-5857") - def test_radius_server_fiveg_per_ssid_perclient_upstream_downstream(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_upstream_downstream_per_ssid_perclient", - mode=mode, - vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_per_ssid - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5858", name="WIFI-5858") - def test_radius_server_2g_per_ssid(self, lf_test, lf_tools, rate_radius_info, rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_per_ssid", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP and UDP IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_per_ssid - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5860", name="WIFI-5860") - def test_radius_server_fiveg_per_ssid(self, lf_test, lf_tools, rate_radius_info, rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_per_ssid", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_per_ssid_per_client - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5862", name="WIFI-5862") - def test_radius_server_2g_per_ssid_per_client(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g_per_ssid_per_client", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="TCP and UDP IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @pytest.mark.fiveg_per_ssid_per_client - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5864", name="WIFI-5864") - def test_radius_server_fiveg_per_ssid_per_client(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_fiveg): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "fiveg" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_5g_per_ssid_per_client", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP and UDP IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.twog_per_ssid_down - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5868", name="WIFI-5868") - def test_radius_server_2g_per_ssid_downstream(self, lf_test, lf_tools, rate_radius_info, - rate_radius_accounting_info, - station_names_twog): - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - print("authentication", rate_radius_info) - print("accounting", rate_radius_accounting_info) - ttls_passwd = rate_radius_info["password"] - identity = rate_radius_info['user'] - allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Total Upload Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Test_Radius_2g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP and UDP IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - assert True - - @pytest.mark.twog - @pytest.mark.max_upload_user1 - @pytest.mark.wpa2_enterprise - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7618", name="WIFI-7618") - def test_radius_server_ratelimit_maxupload_groupuser1_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-upload ratelimit of group - user1 - pytest -m "wpa2_enterprise and twog and max_upload_user1" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user1' - configured = 10 - allure.attach(name="Max-Upload-User1", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[1][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " - f"user1: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_download_user1 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7619", name="WIFI-7619") - def test_radius_server_ratelimit_maxdownload_groupuser1_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-download ratelimit of group - user1 - pytest -m "wpa2_enterprise and twog and max_download_user1" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user1' - configured = 10 - allure.attach(name="Max-Download-User1", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[0][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " - f"user1: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_upload_user2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7620", name="WIFI-7620") - def test_radius_server_ratelimit_maxupload_groupuser2_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-upload ratelimit of group - user2 - pytest -m "wpa2_enterprise and twog and max_upload_user2" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user2' - configured = 20 - allure.attach(name="Max-Upload-User2", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[1][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " - f"user2: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_download_user2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7621", name="WIFI-7621") - def test_radius_server_ratelimit_maxdownload_groupuser2_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-download ratelimit of group - user2 - pytest -m "wpa2_enterprise and twog and max_download_user2" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user2' - configured = 20 - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - allure.attach(name="Max-Download-User2", body=str(profile_data["rate-limit"])) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[0][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " - f"user2: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_upload_user3 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7622", name="WIFI-7622") - def test_radius_server_ratelimit_maxupload_groupuser3_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-download ratelimit of group - user3 - pytest -m "wpa2_enterprise and twog and max_upload_user3" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user3' - configured = 10 - allure.attach(name="Max-Upload-User3", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user3", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[1][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " - f"user3: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_download_user3 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7623", name="WIFI-7623") - def test_radius_server_ratelimit_maxdownload_groupuser3_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-download ratelimit of group - user3 - pytest -m "wpa2_enterprise and twog and max_download_user3" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user3' - configured = 50 - allure.attach(name="Max-Download-User3", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user3", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[0][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " - f"user1: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_upload_user4 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7624", name="WIFI-7624") - def test_radius_server_ratelimit_maxupload_groupuser4_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-upload ratelimit of group - user4 - pytest -m "wpa2_enterprise and twog and max_upload_user4" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user4' - configured = 50 - allure.attach(name="Max-Upload-User4", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", mode=mode, vlan_id=vlan, - download_rate="0bps", batch_size="1", - upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[1][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " - f"user4: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" - - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @pytest.mark.max_download_user4 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7625", name="WIFI-7625") - def test_radius_server_ratelimit_maxdownload_groupuser4_2g(self, lf_test, lf_tools, station_names_twog): - """ - Test: check max-download ratelimit of group - user4 - pytest -m "wpa2_enterprise and twog and max_download_user4" - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] - ssid_name = profile_data["ssid_name"] - mode = "BRIDGE" - vlan = 1 - security = "wpa2" - band = "twog" - eap = "TTLS" - ttls_passwd = 'password' - identity = 'user4' - configured = 10 - allure.attach(name="Max-Download-User4", body=str(profile_data["rate-limit"])) - passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) - print(passes) - if passes: - raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] - wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0bps", protocol="TCP-IPv4", duration="60000", - raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) - print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[0][1])) - allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " - f"user4: {configured} Mbps \nAchieved throughput " - f"via Test: {achieved} Mbps") - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") - if float(achieved) != float(0) and (achieved <= configured): - assert True - else: - assert False, f"Expected Throughput should be less than {configured} Mbps" - else: - assert False, "EAP Connect Failed" diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_rate_limiting_with_radius.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_rate_limiting_with_radius.py new file mode 100644 index 000000000..b79bb0746 --- /dev/null +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_rate_limiting_with_radius.py @@ -0,0 +1,1082 @@ +""" +Rate LImiting with radius Bridge Mode Scenario +""" + +import allure +import pytest +import importlib + +lf_library = importlib.import_module("configuration") +RATE_LIMITING_RADIUS_SERVER_DATA = lf_library.RATE_LIMITING_RADIUS_SERVER_DATA +RATE_LIMITING_RADIUS_ACCOUNTING_DATA = lf_library.RATE_LIMITING_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.rate_limiting_with_radius_tests, + pytest.mark.bridge] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }, + "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, + "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA + + }, + {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }, + "radius_auth_data": RATE_LIMITING_RADIUS_SERVER_DATA, + "radius_acc_data": RATE_LIMITING_RADIUS_ACCOUNTING_DATA + } + ] + }, + "rf": {}, + "radius": True +} + + +@allure.feature("Rate Limiting With Radius Test") +@allure.parent_suite("Rate Limiting With Radius Test") +@allure.suite("BRIDGE Mode") +@allure.sub_suite("WPA2 Enterprise Security") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingWithRadiusBridge(object): + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.ow_sanity_lf + @pytest.mark.kl + @pytest.mark.twog_upload_per_ssid + @allure.title("Test for Upload per SSID 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5849", name="WIFI-5849") + def test_radius_server_2g_upload_per_ssid(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_up_per_ssid", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_download_perssid_persta + @pytest.mark.ow_sanity_lf + @allure.title("Test for Download per SSID per Station 2.4GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5850", name="WIFI-5850") + def test_radius_server_2g_download_perssid_persta(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_down_perssid_persta", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_upload_persta_perclient + @allure.title("Test for Upload per station per client 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5851", name="WIFI-5851") + @allure.title("Test for Upload per station per client 2.4GHz") + def test_radius_server_2g_upload_persta_perclient_rate(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_up_perssid_persta", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="2.488Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_upload_download_persta_perclient + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5852", name="WIFI-5852") + @allure.title("Test for Upload Download per station per client 2.4GHz") + def test_radius_server_2g_upload_download_persta_perclient_rate(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_up_down_per_per_client", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_download_per_ssid + @allure.title("Test for Download per SSID 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5853", name="WIFI-5853") + def test_radius_server_fiveg_per_ssid_download(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_down_per_ssid", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_upload_per_ssid + @allure.title("Test for Upload per SSID 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5854", name="WIFI-5854") + def test_radius_server_fiveg_per_ssid_upload(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_up_per_ssid", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_download_per_ssid_per_client + @allure.title("Test for Download per SSID per client 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5855", name="WIFI-5855") + def test_radius_server_fiveg_per_ssid_perclient_download(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_down_per_ssid_perclient", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_upstream_per_ssid_per_client + @allure.title("Test for Upload per SSID per client 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5856", name="WIFI-5856") + def test_radius_server_fiveg_per_ssid_perclient_upstream(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_upstream_per_ssid_perclient", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_upstream__downstream_per_ssid_per_client + @allure.title("Test for Upload Download per SSID per client 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5857", name="WIFI-5857") + def test_radius_server_fiveg_per_ssid_perclient_upstream_downstream(self, get_test_library, + get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, + rate_radius_info, + rate_radius_accounting_info, + check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_upstream_downstream_per_ssid_perclient", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_per_ssid + @allure.title("Test for per SSID 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5858", name="WIFI-5858") + def test_radius_server_2g_per_ssid(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_per_ssid", + mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP and UDP IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_per_ssid + @allure.title("Test for per SSID 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5860", name="WIFI-5860") + def test_radius_server_fiveg_per_ssid(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_per_ssid", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_per_ssid_per_client + @allure.title("Test for per SSID per client 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5862", name="WIFI-5862") + def test_radius_server_2g_per_ssid_per_client(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g_per_ssid_per_client", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP and UDP IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @pytest.mark.fiveg_per_ssid_per_client + @allure.title("Test for per SSID per client 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5864", name="WIFI-5864") + def test_radius_server_fiveg_per_ssid_per_client(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "fiveg" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Upload Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_5g_per_ssid_per_client", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP and UDP IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.twog_per_ssid_down + @allure.title("Test for Download per SSID 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5868", name="WIFI-5868") + def test_radius_server_2g_per_ssid_downstream(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = rate_radius_info["password"] + identity = rate_radius_info['user'] + allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Total Upload Rate:"]] + get_test_library.wifi_capacity(instance_name="Test_Radius_2g", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP and UDP IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + assert True + + @pytest.mark.twog + @pytest.mark.max_upload_user1 + @pytest.mark.wpa2_enterprise + @allure.title("Test for max upload group user1 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7618", name="WIFI-7618") + def test_radius_server_ratelimit_maxupload_groupuser1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-upload ratelimit of group - user1 + pytest -m "wpa2_enterprise and twog and max_upload_user1" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user1' + configured = 10 + allure.attach(name="Max-Upload-User1", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", + mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[1][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + # f"user1: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user1 + @allure.title("Test for max download group user1 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7619", name="WIFI-7619") + def test_radius_server_ratelimit_maxdownload_groupuser1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-download ratelimit of group - user1 + pytest -m "wpa2_enterprise and twog and max_download_user1" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user1' + configured = 10 + allure.attach(name="Max-Download-User1", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user1", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[0][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " + # f"user1: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_upload_user2 + @allure.title("Test for max upload group user2 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7620", name="WIFI-7620") + def test_radius_server_ratelimit_maxupload_groupuser2_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-upload ratelimit of group - user2 + pytest -m "wpa2_enterprise and twog and max_upload_user2" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user2' + configured = 20 + allure.attach(name="Max-Upload-User2", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user2", + mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[1][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + # f"user2: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user2 + @allure.title("Test for max download group user2 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7621", name="WIFI-7621") + def test_radius_server_ratelimit_maxdownload_groupuser2_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-download ratelimit of group - user2 + pytest -m "wpa2_enterprise and twog and max_download_user2" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user2' + configured = 20 + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + allure.attach(name="Max-Download-User2", body=str(profile_data["rate-limit"])) + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user2", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[0][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + # f"user2: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_upload_user3 + @allure.title("Test for max upload group user3 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7622", name="WIFI-7622") + def test_radius_server_ratelimit_maxupload_groupuser3_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-download ratelimit of group - user3 + pytest -m "wpa2_enterprise and twog and max_upload_user3" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user3' + configured = 10 + allure.attach(name="Max-Upload-User3", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user2", + mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[1][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + # f"user3: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user3 + @allure.title("Test for max download group user3 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7623", name="WIFI-7623") + def test_radius_server_ratelimit_maxdownload_groupuser3_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-download ratelimit of group - user3 + pytest -m "wpa2_enterprise and twog and max_download_user3" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user3' + configured = 50 + allure.attach(name="Max-Download-User3", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user3", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[0][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " + # f"user1: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_upload_user4 + @allure.title("Test for max upload group user4 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7624", name="WIFI-7624") + def test_radius_server_ratelimit_maxupload_groupuser4_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-upload ratelimit of group - user4 + pytest -m "wpa2_enterprise and twog and max_upload_user4" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user4' + configured = 50 + allure.attach(name="Max-Upload-User4", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", + mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[1][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + # f"user4: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user4 + @allure.title("Test for max download group user4 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7625", name="WIFI-7625") + def test_radius_server_ratelimit_maxdownload_groupuser4_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, rate_radius_info, + rate_radius_accounting_info, check_connectivity): + """ + Test: check max-download ratelimit of group - user4 + pytest -m "wpa2_enterprise and twog and max_download_user4" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user4' + configured = 10 + allure.attach(name="Max-Download-User4", body=str(profile_data["rate-limit"])) + get_test_library.pre_cleanup() + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration, + cleanup=False) + if passes != "PASS": + assert passes == "PASS", result + if passes == "PASS": + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + get_test_library.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", + mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + add_stations=False, raw_lines=raw_lines) + + # kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + # print(kpi_data) + # achieved = float("{:.2f}".format(kpi_data[0][1])) + # allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " + # f"user4: {configured} Mbps \nAchieved throughput " + # f"via Test: {achieved} Mbps") + # lf_tools.attach_report_graphs(report_name=report_name) + # print("Test Completed... Cleaning up Stations") + # if float(achieved) != float(0) and (achieved <= configured): + # assert True + # else: + # assert False, f"Expected Throughput should be less than {configured} Mbps" + # else: + # assert False, "EAP Connect Failed" diff --git a/tests/e2e/basic/validation_of_operating_modes/client_isolation/test_client_isolation.py b/tests/e2e/basic/validation_of_operating_modes/client_isolation/test_client_isolation.py index d554f0086..469a482f9 100644 --- a/tests/e2e/basic/validation_of_operating_modes/client_isolation/test_client_isolation.py +++ b/tests/e2e/basic/validation_of_operating_modes/client_isolation/test_client_isolation.py @@ -50,12 +50,16 @@ setup_params_general = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("BRIDGE MODE CLIENT ISOLATION") +@allure.parent_suite("CLIENT ISOLATION") +@allure.suite(suite_name="BRIDGE MODE") +@allure.sub_suite(sub_suite_name="Test Client Isolation Enabled SSIDs") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.ci_enabled class TestClientIsolationEnabled(object): """ @@ -63,12 +67,14 @@ class TestClientIsolationEnabled(object): pytest -m "client_isolation and ci_enabled and bridge" """ @pytest.mark.wpa2_personal + @pytest.mark.hi @pytest.mark.fiveg @pytest.mark.ci_enabled_in_5g_ssid @allure.title("Verify the connectivity of 2 clients connected to the different SSID by enabling the client " "isolation in both the SSID's.(5Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10610", name="WIFI-10610") - def test_client_isolation_enabled_ssid_5g(self, lf_test, get_configuration): + def test_client_isolation_enabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][2] ssid_name1 = profile_data["ssid_name"] @@ -77,33 +83,37 @@ class TestClientIsolationEnabled(object): security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] - sta = ["sta100", "sta101"] + radio_name = get_test_library.wave2_5g_radios[0] + station_name = get_test_library.fiveg_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][2])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[0]]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[1]]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta,side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names",value="VALUE", name="cx_data") - lf_test.l3_cleanup() + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names",value="VALUE", name="cx_data") + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -133,41 +143,43 @@ class TestClientIsolationEnabled(object): print("Layer3 not ran properly.") @pytest.mark.wpa2_personal + @pytest.mark.hi @pytest.mark.twog @pytest.mark.ci_enabled_in_2g_ssid @allure.title("Run traffic between eth2 port (AP) and station (with client isolation enabled) -2.4GHz") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10620", name="WIFI-10620") - def test_client_isolation_enabled_with_2g(self, lf_test, get_configuration): + def test_client_isolation_enabled_with_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list = "sta000" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] + radio_name = get_test_library.wave2_2g_radios[0] + station_list = get_test_library.twog_prefix allure.attach(name="station_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][0])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[station_list]) - result = lf_test.json_get(_req_url="port/1/1/%s" % (station_list)) - lf_test.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", + result = get_test_library.json_get(_req_url="port/1/1/%s" % (station_list)) + get_test_library.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", name="%s info" % (station_list)) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=[station_list], side_b="") print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [station_list,"eth2"], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"], rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"], rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -204,7 +216,8 @@ class TestClientIsolationEnabled(object): @allure.title("Verify the connectivity of 2 clients connected to the different SSID by enabling the client " "isolation in both the SSID's.(2.4Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10602",name="WIFI-10602") - def test_client_isolation_enabled_ssids_2g(self,lf_test, get_configuration): + def test_client_isolation_enabled_ssids_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] @@ -213,35 +226,39 @@ class TestClientIsolationEnabled(object): security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] - sta = ["sta000", "sta001"] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][1])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[0]]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[1]]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -276,7 +293,8 @@ class TestClientIsolationEnabled(object): @pytest.mark.eth_to_5g_station_true @allure.title("Run traffic between eth2 port (AP) and station (with client isolation enabled) -5GHz") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10621", name="WIFI-10621") - def test_client_isolation_enabled_with_5g(self, lf_test, get_configuration): + def test_client_isolation_enabled_with_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][2] ssid_name = profile_data["ssid_name"] @@ -284,29 +302,30 @@ class TestClientIsolationEnabled(object): station_list = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] + radio_name = get_test_library.wave2_5g_radios[0] + station_list = get_test_library.fiveg_prefix allure.attach(name="station1_ssid_config-info", body=str(setup_params_general["ssid_modes"]["wpa2_personal"][2])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[station_list]) - result = lf_test.json_get(_req_url="port/1/1/%s" % (station_list)) - lf_test.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", + result = get_test_library.json_get(_req_url="port/1/1/%s" % (station_list)) + get_test_library.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", name="%s info" % (station_list)) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=[station_list], side_b="") print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [station_list,"eth2"], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -375,12 +394,16 @@ setup_params_general1 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("BRIDGE MODE CLIENT ISOLATION") +@allure.parent_suite("CLIENT ISOLATION") +@allure.suite(suite_name="BRIDGE MODE") +@allure.sub_suite(sub_suite_name="Test Client Isolation Disabled SSIDs") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.ci_disabled class TestClientIsolationDisabled(object): """ @@ -393,7 +416,8 @@ class TestClientIsolationDisabled(object): @allure.title("Verify the connectivity of 2 clients connected to the different SSID disabling the client " "isolation(2.4Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10603", name="WIFI-10603") - def test_client_isolation_disabled_ssids_2g(self, lf_test, get_configuration): + def test_client_isolation_disabled_ssids_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] @@ -402,35 +426,39 @@ class TestClientIsolationDisabled(object): security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] - sta = ["sta000", "sta001"] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][1])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[0]]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[1]]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -463,36 +491,37 @@ class TestClientIsolationDisabled(object): @pytest.mark.eth_to_2g_station_false @allure.title("Run traffic between eth2 port (AP) and station (with client isolation disabled) -2.4GHz") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10624", name="WIFI-10624") - def test_client_isolation_disabled_with_2g(self, lf_test, get_configuration): + def test_client_isolation_disabled_with_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list = "sta000" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] + radio_name = get_test_library.wave2_2g_radios[0] + station_list = get_test_library.twog_prefix allure.attach(name="station_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][0])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[station_list]) - result = lf_test.json_get(_req_url="port/1/1/%s" % (station_list)) - lf_test.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", + result = get_test_library.json_get(_req_url="port/1/1/%s" % (station_list)) + get_test_library.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", name="%s info" % (station_list)) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=[station_list], side_b="") print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [station_list,"eth2"], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -527,7 +556,8 @@ class TestClientIsolationDisabled(object): @allure.title("Verify the connectivity of 2 clients connected to the different SSID disabling the client " "isolation(5Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10611",name="WIFI-10611") - def test_client_isolation_disabled_ssid_5g(self,lf_test, get_configuration): + def test_client_isolation_disabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][2] ssid_name1 = profile_data["ssid_name"] @@ -536,34 +566,38 @@ class TestClientIsolationDisabled(object): security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] - sta = ["sta100", "sta101"] + radio_name = get_test_library.wave2_5g_radios[0] + station_name = get_test_library.fiveg_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][2])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[0]]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[sta[1]]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -597,36 +631,37 @@ class TestClientIsolationDisabled(object): @pytest.mark.eth_to_5g_station_false @allure.title("Run traffic between eth2 port (AP) and station (with client isolation disabled) -5GHz") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10623", name="WIFI-10623") - def test_client_isolation_disabled_with_5g(self, lf_test, get_configuration): + def test_client_isolation_disabled_with_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][2] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] + radio_name = get_test_library.wave2_5g_radios[0] + station_list = get_test_library.fiveg_prefix allure.attach(name="station_ssid_config-info", body=str(setup_params_general1["ssid_modes"]["wpa2_personal"][2])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=[station_list]) - result = lf_test.json_get(_req_url="port/1/1/%s" % (station_list)) - lf_test.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", + result = get_test_library.json_get(_req_url="port/1/1/%s" % (station_list)) + get_test_library.allure_report_table_format(dict_data=result["interface"], key="Station_port_data",value="VALUE", name="%s info" % (station_list)) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=[station_list], side_b="") print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [station_list,"eth2"], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -693,12 +728,16 @@ setup_params_general2 = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("BRIDGE MODE CLIENT ISOLATION") +@allure.parent_suite("CLIENT ISOLATION") +@allure.suite(suite_name="BRIDGE MODE") +@allure.sub_suite(sub_suite_name="Test Client Isolation Same SSIDs") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.ci_same_ssid class TestClientIsolationSameSSID(object): """ @@ -711,39 +750,44 @@ class TestClientIsolationSameSSID(object): @allure.title("Verify the connectivity of 2 clients connected to the same SSID enabling the client " "isolation.(2.4Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10601", name="WIFI-10601") - def test_cleint_isolation_enabled_same_ssid_2g(self, lf_test, get_configuration): + def test_cleint_isolation_enabled_same_ssid_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] - sta = ["sta000", "sta001"] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station_ssid_config-info", body=str(setup_params_general2["ssid_modes"]["wpa2_personal"][0])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=sta) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -777,39 +821,44 @@ class TestClientIsolationSameSSID(object): @allure.title("Verify the connectivity of 2 clients connected to the same SSID without enabling the client " "isolation.(2.4Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10604",name="WIFI-10604") - def test_cleint_isolation_disabled_same_ssid_2g(self,lf_test, get_configuration): + def test_cleint_isolation_disabled_same_ssid_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] - sta = ["sta000", "sta001"] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station_ssid_config-info", body=str(setup_params_general2["ssid_modes"]["wpa2_personal"][1])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=sta) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -843,39 +892,44 @@ class TestClientIsolationSameSSID(object): @pytest.mark.same_ssid_enabling_isolation_5g @allure.title("Verify the connectivity of 2 clients connected to the same SSID by enabling client isolation.(5Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10606", name="WIFI-10606") - def test_cleint_isolation_enabled_same_ssid_5g(self, lf_test, get_configuration): + def test_cleint_isolation_enabled_same_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][2] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] - sta = ["sta100", "sta101"] + radio_name = get_test_library.wave2_5g_radios[0] + station_name = get_test_library.fiveg_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station_ssid_config-info", body=str(setup_params_general2["ssid_modes"]["wpa2_personal"][2])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=sta) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -907,39 +961,44 @@ class TestClientIsolationSameSSID(object): @pytest.mark.same_ssid_disabling_isolation_5g @allure.title("Verify the connectivity of 2 clients connected to the same SSID disabling the client isolation.(5Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10612", name="WIFI-10612") - def test_cleint_isolation_disabled_same_ssid_5g(self, lf_test, get_configuration): + def test_cleint_isolation_disabled_same_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][3] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] - sta = ["sta100", "sta101"] + radio_name = get_test_library.wave2_5g_radios[0] + station_name = get_test_library.fiveg_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station_ssid_config-info", body=str(setup_params_general2["ssid_modes"]["wpa2_personal"][3])) - station_result = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=security_key, + station_result = get_test_library.client_connect_using_radio(ssid=ssid_name, passkey=security_key, security=security, mode=mode, radio=radio_name, station_name=sta) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[0])) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (sta[1])) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[0])) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS",value="VALUE", name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, traffic_type="lf_udp", sta_list=sta, side_b=sta[1]) print("waiting 30 sec for getting cx_list data...") time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() + get_test_library.l3_cleanup() table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} @@ -1006,12 +1065,16 @@ setup_params_general3 = { "radius": False } @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("BRIDGE MODE CLIENT ISOLATION") +@allure.parent_suite("CLIENT ISOLATION") +@allure.suite(suite_name="BRIDGE MODE") +@allure.sub_suite(sub_suite_name="Test Client Isolation Enable and Disabled with Different SSIDs") +@pytest.mark.usefixtures("setup_configuration") @pytest.mark.ci_different_ssid class TestClientIsolationDifferentSSID(object): """ @@ -1021,52 +1084,57 @@ class TestClientIsolationDifferentSSID(object): # clients_connected to different ssid,enabling isolation in ssid (2GH)& isolation disabled in ssid (2GHZ) @pytest.mark.wpa2_personal + @pytest.mark.ci @pytest.mark.twog @pytest.mark.ci_enable_and_disable_2g @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in one and disabled in other.(2.4Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10605", name="WIFI-10605") - def test_client_isoaltion_enabled_ssid_2g_disabled_ssid_2g(self, lf_test, station_names_twog, get_configuration): + def test_client_isoaltion_enabled_ssid_2g_disabled_ssid_2g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta001" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.twog_radios[0] + radio_name = get_test_library.wave2_2g_radios[0] + station_name = get_test_library.twog_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][1])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, - station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, - station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1], side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]], side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1097,52 +1165,56 @@ class TestClientIsolationDifferentSSID(object): # clients_connected to different ssid,enabling isolation in ssid (5GH)& isolation disabled in ssid (5GHZ) @pytest.mark.wpa2_personal + @pytest.mark.ci @pytest.mark.fiveg @pytest.mark.ci_enable_and_disable_5g @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in one and disabled in other.(5Ghz)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10613", name="WIFI-10613") - def test_client_isoaltion_enabled_ssid_5g_disabled_ssid_5g(self, lf_test, station_names_fiveg, get_configuration): + def test_client_isoaltion_enabled_ssid_5g_disabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][2] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][3] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta100" - station_list2 = "sta101" security = "wpa2" mode = "BRIDGE" - radio_name = lf_test.fiveg_radios[0] - + radio_name = get_test_library.wave2_5g_radios[0] + station_name = get_test_library.fiveg_prefix + sta = [] + for i in range(2): + sta.append(station_name + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][2])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name, - station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name, - station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1], side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]], side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1178,47 +1250,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in 2G SSID and 5G SSID (run traffic from 2G client to 5G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10616", name="WIFI-10616") - def test_client_isolation_enabled_ssid2g_and_ssid5g(self, lf_test, station_names_twog, station_names_fiveg, - get_configuration): + def test_client_isolation_enabled_ssid2g_and_ssid5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][2] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][2])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="0 (zero)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=0, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1], side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]], side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0], sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1253,47 +1330,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is disabled" " in 2G SSID and 5G SSID (run traffic from 2G client to 5G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10618",name="WIFI-10618") - def test_client_isolation_disabled_ssid2g_and_ssid5g(self, lf_test, station_names_twog, station_names_fiveg, - get_configuration): + def test_client_isolation_disabled_ssid2g_and_ssid5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][3] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][1])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="0 (zero)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=0, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1], side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]], side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1330,47 +1412,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in 2G SSID and 5G SSID (run traffic from 5G client to 2G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10617", name="WIFI-10617") - def test_client_isolation_enabled_ssid_2gandssid_5g(self, lf_test, station_names_twog, station_names_fiveg, - get_configuration): + def test_client_isolation_enabled_ssid_2gandssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][2] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][2])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="0 (zero)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=0, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=0, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1],side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]],side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1407,47 +1494,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is disabled" " in 2G SSID and 5G SSID (run traffic from 5G client to 2G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10619",name="WIFI-10619") - def test_client_isolation_disabled_ssid_2gandssid_5g(self, lf_test, station_names_twog, station_names_fiveg, - get_configuration): + def test_client_isolation_disabled_ssid_2gandssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][3] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][1])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="0 (zero)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=0, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=0, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1],side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]],side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1483,46 +1575,51 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in 2G SSID and disabled in 5G SSID (run traffic from 2G client to 5G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10614", name="WIFI-10614") - def test_client_isolation_enabled_ssids_2gdisabled_ssid_5g(self, lf_test, station_names_twog, station_names_fiveg, - get_ap_channel): + def test_client_isolation_enabled_ssids_2gdisabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][3] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="0 (zero)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=0, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1],side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]],side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1559,49 +1656,54 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is disabled" " in 2G SSID and enabled in 5G SSID (run traffic from 5G client to 2G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10625", name="WIFI-10625") - def test_client_isolation_disabled_ssid_2genabled_ssid_5g(self, lf_test, station_names_twog,station_names_fiveg, - get_configuration): + def test_client_isolation_disabled_ssid_2genabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][2] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][1])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][2])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, security=security, mode=mode, radio=radio_name1, - station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, + station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, security=security, mode=mode, radio=radio_name2, - station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="0 (zero)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=0, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=0, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1], side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]], side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1640,47 +1742,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is enabled" " in 2G SSID and disabled in 5G SSID (run traffic from 5G client to 2G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10615",name="WIFI-10615") - def test_client_isolation_enabled_ssids_2g_disabled_ssid_5g(self, lf_test, station_names_twog, station_names_fiveg, - get_ap_channel): + def test_client_isolation_enabled_ssids_2g_disabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][3] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][0])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][3])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="0 (zero)") allure.attach(name="Min Tx rate -B", body="6291456 (6.2 Mbps)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=0, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=0, side_a_max_rate=0, side_b_min_rate=6291456, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1],side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]],side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) @@ -1718,47 +1825,52 @@ class TestClientIsolationDifferentSSID(object): @allure.title("Verify the connectivity of 2 clients connected to different SSID's where Client isolation is disabled" " in 2G SSID and enabled in 5G SSID (run traffic from 2G client to 5G client)") @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10626", name="WIFI-10626") - def test_client_isolation_disabled_ssid_2g_enabled_ssid_5g(self, lf_test, station_names_twog, station_names_fiveg, - get_configuration): + def test_client_isolation_disabled_ssid_2g_enabled_ssid_5g(self, setup_configuration, get_test_library, num_stations, + get_test_device_logs, get_dut_logs_per_test_case, check_connectivity): profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] ssid_name1 = profile_data["ssid_name"] profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][2] ssid_name2 = profile_data["ssid_name"] security_key = profile_data["security_key"] - station_list1 = "sta000" - station_list2 = "sta100" security = "wpa2" mode = "BRIDGE" - radio_name1 = lf_test.twog_radios[0] - radio_name2 = lf_test.fiveg_radios[0] + radio_name1 = get_test_library.wave2_2g_radios[0] + radio_name2 = get_test_library.wave2_5g_radios[0] + station_name1 = get_test_library.twog_prefix + station_name2 = get_test_library.fiveg_prefix + sta = [] + for i in range(1): + sta.append(station_name1 + str(i)) + sta.append(station_name2 + str(i)) + print(sta) allure.attach(name="station1_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][1])) allure.attach(name="station2_ssid_config-info", body=str(setup_params_general3["ssid_modes"]["wpa2_personal"][2])) - station_result1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name1, passkey=security_key, - security=security, mode=mode, radio=radio_name1, station_name=[station_list1]) - station_result2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name2, passkey=security_key, - security=security, mode=mode, radio=radio_name2, station_name=[station_list2]) - sta_data1 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list1)) - sta_data2 = lf_test.json_get(_req_url="port/1/1/%s" % (station_list2)) - lf_test.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list1)) - lf_test.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", - name="%s info" % (station_list2)) + station_result1 = get_test_library.client_connect_using_radio(ssid=ssid_name1, passkey=security_key, + security=security, mode=mode, radio=radio_name1, station_name=[sta[0]]) + station_result2 = get_test_library.client_connect_using_radio(ssid=ssid_name2, passkey=security_key, + security=security, mode=mode, radio=radio_name2, station_name=[sta[1]]) + sta_data1 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[0])) + sta_data2 = get_test_library.json_get(_req_url="port/1/1/%s" % (sta[1])) + get_test_library.allure_report_table_format(dict_data=sta_data1["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[0])) + get_test_library.allure_report_table_format(dict_data=sta_data2["interface"], key="STATION DETAILS", value="VALUE", + name="%s info" % (sta[1])) allure.attach(name="Min Tx rate -A", body="6291456 (6.2 Mbps)") allure.attach(name="Min Tx rate -B", body="0 (zero)") - layer3_restult = lf_test.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, + layer3_restult = get_test_library.create_layer3(side_a_min_rate=6291456, side_a_max_rate=0, side_b_min_rate=0, side_b_max_rate=0, - traffic_type="lf_udp", sta_list=[station_list1],side_b=station_list2) - print("waiting 45 sec for getting cx_list data...") - time.sleep(45) + traffic_type="lf_udp", sta_list=[sta[0]],side_b=sta[1]) + print("waiting 30 sec for getting cx_list data...") + time.sleep(30) - cx_list = lf_test.get_cx_list() - rx_data = lf_test.json_get(_req_url=f"cx/{cx_list[0]}") - lf_test.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", + cx_list = get_test_library.get_cx_list() + rx_data = get_test_library.json_get(_req_url=f"cx/{cx_list[0]}") + get_test_library.allure_report_table_format(dict_data=rx_data[f"{cx_list[0]}"], key="Layer-3 Column Names", value="VALUE", name="cx_data") - lf_test.l3_cleanup() - table_data = {"Station Name": [station_list1,station_list2], + get_test_library.l3_cleanup() + table_data = {"Station Name": [sta[0],sta[1]], "bps rx a": [rx_data[f"{cx_list[0]}"]["bps rx a"],rx_data[f"{cx_list[0]}"]["bps rx b"]], "rx drop %": [rx_data[f"{cx_list[0]}"]["rx drop % a"],rx_data[f"{cx_list[0]}"]["rx drop % b"]]} table = tabulate(table_data, headers='keys', tablefmt='fancy_grid', showindex=True) diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/fiveg_band/test_CA_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/fiveg_band/test_CA_20Mhz_5g.py index 4930ca9e0..b5ef44dbb 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/fiveg_band/test_CA_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/fiveg_band/test_CA_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -35,15 +34,17 @@ setup_params_general1 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,11 +54,12 @@ class TestCountryCA20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -67,10 +69,10 @@ class TestCountryCA20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -80,8 +82,7 @@ class TestCountryCA20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf":{ "5G":{ @@ -101,14 +102,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +122,12 @@ class TestCountryCA20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +137,10 @@ class TestCountryCA20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -144,8 +149,7 @@ class TestCountryCA20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -165,14 +169,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -182,11 +189,12 @@ class TestCountryCA20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -196,10 +204,10 @@ class TestCountryCA20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -209,8 +217,7 @@ class TestCountryCA20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -230,14 +237,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,11 +257,12 @@ class TestCountryCA20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -261,10 +272,10 @@ class TestCountryCA20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -274,8 +285,7 @@ class TestCountryCA20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -295,14 +305,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -312,11 +325,12 @@ class TestCountryCA20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -326,10 +340,10 @@ class TestCountryCA20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -339,8 +353,7 @@ class TestCountryCA20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -360,14 +373,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -377,11 +393,12 @@ class TestCountryCA20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -391,10 +408,10 @@ class TestCountryCA20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -404,8 +421,7 @@ class TestCountryCA20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -424,14 +440,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -441,11 +460,12 @@ class TestCountryCA20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -455,10 +475,10 @@ class TestCountryCA20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -468,8 +488,7 @@ class TestCountryCA20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -489,14 +508,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -506,11 +528,12 @@ class TestCountryCA20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -520,10 +543,10 @@ class TestCountryCA20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -533,8 +556,7 @@ class TestCountryCA20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -553,14 +575,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -570,11 +595,12 @@ class TestCountryCA20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -584,10 +610,10 @@ class TestCountryCA20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -597,8 +623,7 @@ class TestCountryCA20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -617,14 +642,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -634,11 +662,12 @@ class TestCountryCA20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -648,10 +677,10 @@ class TestCountryCA20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -661,8 +690,7 @@ class TestCountryCA20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -681,14 +709,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -698,11 +729,12 @@ class TestCountryCA20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -712,10 +744,10 @@ class TestCountryCA20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -725,8 +757,7 @@ class TestCountryCA20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -745,14 +776,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -762,11 +796,12 @@ class TestCountryCA20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -776,10 +811,10 @@ class TestCountryCA20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -789,8 +824,7 @@ class TestCountryCA20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -809,14 +843,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -826,11 +863,12 @@ class TestCountryCA20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -840,10 +878,10 @@ class TestCountryCA20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -853,8 +891,7 @@ class TestCountryCA20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -873,14 +910,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -890,11 +930,12 @@ class TestCountryCA20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -904,10 +945,10 @@ class TestCountryCA20Mhz5GChannel132(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -917,8 +958,7 @@ class TestCountryCA20Mhz5GChannel132(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -937,14 +977,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -954,11 +997,12 @@ class TestCountryCA20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -968,10 +1012,10 @@ class TestCountryCA20Mhz5GChannel136(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -981,8 +1025,7 @@ class TestCountryCA20Mhz5GChannel136(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -1001,14 +1044,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1018,11 +1064,12 @@ class TestCountryCA20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1032,10 +1079,10 @@ class TestCountryCA20Mhz5GChannel140(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -1045,8 +1092,7 @@ class TestCountryCA20Mhz5GChannel140(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G":{ @@ -1065,14 +1111,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1082,11 +1131,12 @@ class TestCountryCA20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1096,10 +1146,10 @@ class TestCountryCA20Mhz5GChannel144(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/twog_band/test_CA_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/twog_band/test_CA_20Mhz_2g.py index 8484b8ec3..3f14969fd 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/twog_band/test_CA_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_20Mhz/twog_band/test_CA_20Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryCA20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryCA20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryCA20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryCA20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryCA20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryCA20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryCA20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryCA20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryCA20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryCA20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryCA20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryCA20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryCA20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryCA20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryCA20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryCA20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryCA20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryCA20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryCA20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryCA20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("CA country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryCA20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryCA20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/fiveg_band/test_CA_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/fiveg_band/test_CA_40Mhz_5g.py index c1f31ff99..317f2e27d 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/fiveg_band/test_CA_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/fiveg_band/test_CA_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -36,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,11 +55,12 @@ class TestCountryCA40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -67,10 +70,10 @@ class TestCountryCA40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -80,8 +83,7 @@ class TestCountryCA40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountryCA40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountryCA40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -145,8 +151,7 @@ class TestCountryCA40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -166,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,11 +191,12 @@ class TestCountryCA40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -197,10 +206,10 @@ class TestCountryCA40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -210,8 +219,7 @@ class TestCountryCA40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -229,14 +237,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -246,11 +257,12 @@ class TestCountryCA40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -260,10 +272,10 @@ class TestCountryCA40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -273,8 +285,7 @@ class TestCountryCA40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -293,14 +304,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -310,11 +324,12 @@ class TestCountryCA40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -324,10 +339,10 @@ class TestCountryCA40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -337,8 +352,7 @@ class TestCountryCA40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -357,14 +371,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -374,11 +391,12 @@ class TestCountryCA40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -388,10 +406,10 @@ class TestCountryCA40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -401,8 +419,7 @@ class TestCountryCA40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -421,14 +438,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -438,11 +458,12 @@ class TestCountryCA40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -452,10 +473,10 @@ class TestCountryCA40Mhz5GChannel132(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -465,8 +486,7 @@ class TestCountryCA40Mhz5GChannel132(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -485,14 +505,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -502,11 +525,12 @@ class TestCountryCA40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -516,10 +540,10 @@ class TestCountryCA40Mhz5GChannel140(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/twog_band/test_CA_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/twog_band/test_CA_40Mhz_2g.py index 7f4b7d2f6..bca31ac20 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/twog_band/test_CA_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_40Mhz/twog_band/test_CA_40Mhz_2g.py @@ -40,14 +40,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -57,8 +60,8 @@ class TestCountryCA40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - @pytest.mark.shivamth - def test_client_bridge_wpa2_chn1_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -72,10 +75,10 @@ class TestCountryCA40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -107,14 +110,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -124,7 +130,8 @@ class TestCountryCA40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -138,10 +145,10 @@ class TestCountryCA40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -173,14 +180,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -190,7 +200,8 @@ class TestCountryCA40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -204,10 +215,10 @@ class TestCountryCA40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -238,14 +249,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -255,7 +269,8 @@ class TestCountryCA40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -269,10 +284,10 @@ class TestCountryCA40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -303,14 +318,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -320,7 +338,8 @@ class TestCountryCA40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -334,10 +353,10 @@ class TestCountryCA40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -368,14 +387,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -385,7 +407,8 @@ class TestCountryCA40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -399,10 +422,10 @@ class TestCountryCA40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -433,14 +456,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -450,7 +476,8 @@ class TestCountryCA40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -464,10 +491,10 @@ class TestCountryCA40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -498,14 +525,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -515,7 +545,8 @@ class TestCountryCA40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -529,10 +560,10 @@ class TestCountryCA40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -563,14 +594,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -580,7 +614,8 @@ class TestCountryCA40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -594,10 +629,10 @@ class TestCountryCA40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -628,14 +663,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -645,7 +683,8 @@ class TestCountryCA40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -659,10 +698,10 @@ class TestCountryCA40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -693,14 +732,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("CA country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -710,7 +752,8 @@ class TestCountryCA40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_CA_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_CA_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -724,10 +767,10 @@ class TestCountryCA40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_80Mhz/fiveg_band/test_CA_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_80Mhz/fiveg_band/test_CA_80Mhz_5g.py index 65e974bc9..37b16cb10 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_80Mhz/fiveg_band/test_CA_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_CA/channel_width_80Mhz/fiveg_band/test_CA_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("CA country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryCA80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryCA80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryCA80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("CA country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryCA80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryCA80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryCA80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("CA country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryCA80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryCA80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountryCA80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("CA country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryCA80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountryCA80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_CA_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_CA_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountryCA80Mhz5GChannel132(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=124, - country='Canada(CA)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=124, + country='Canada(CA)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/fiveg_band/test_GB_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/fiveg_band/test_GB_20Mhz_5g.py index 5e1c8f527..c47b26680 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/fiveg_band/test_GB_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/fiveg_band/test_GB_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -37,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -54,11 +56,12 @@ class TestCountryGB20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -68,10 +71,10 @@ class TestCountryGB20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -81,8 +84,7 @@ class TestCountryGB20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountryGB20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountryGB20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -144,8 +150,7 @@ class TestCountryGB20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -164,14 +169,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -181,11 +189,12 @@ class TestCountryGB20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -195,10 +204,10 @@ class TestCountryGB20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -208,8 +217,7 @@ class TestCountryGB20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -228,14 +236,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -245,11 +256,12 @@ class TestCountryGB20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -259,10 +271,10 @@ class TestCountryGB20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -272,8 +284,7 @@ class TestCountryGB20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -292,14 +303,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -309,11 +323,12 @@ class TestCountryGB20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -323,10 +338,10 @@ class TestCountryGB20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -336,8 +351,7 @@ class TestCountryGB20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -356,14 +370,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -373,11 +390,12 @@ class TestCountryGB20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -387,10 +405,10 @@ class TestCountryGB20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -400,8 +418,7 @@ class TestCountryGB20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -419,14 +436,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -436,11 +456,12 @@ class TestCountryGB20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -450,10 +471,10 @@ class TestCountryGB20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -463,8 +484,7 @@ class TestCountryGB20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -483,14 +503,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -500,11 +523,12 @@ class TestCountryGB20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -514,10 +538,10 @@ class TestCountryGB20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -527,8 +551,7 @@ class TestCountryGB20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -546,14 +569,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -563,11 +589,12 @@ class TestCountryGB20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -577,10 +604,10 @@ class TestCountryGB20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -590,8 +617,7 @@ class TestCountryGB20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -609,14 +635,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -626,11 +655,12 @@ class TestCountryGB20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -640,10 +670,10 @@ class TestCountryGB20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -653,8 +683,7 @@ class TestCountryGB20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -672,14 +701,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -689,11 +721,12 @@ class TestCountryGB20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -703,10 +736,10 @@ class TestCountryGB20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -716,8 +749,7 @@ class TestCountryGB20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -735,14 +767,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -752,11 +787,12 @@ class TestCountryGB20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -766,10 +802,10 @@ class TestCountryGB20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -779,8 +815,7 @@ class TestCountryGB20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -798,14 +833,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -815,11 +853,12 @@ class TestCountryGB20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -829,10 +868,10 @@ class TestCountryGB20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -841,8 +880,7 @@ class TestCountryGB20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -860,14 +898,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-120)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel120(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -877,11 +918,12 @@ class TestCountryGB20Mhz5GChannel120(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel120 - def test_client_bridge_wpa2_chn120_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 120") + def test_client_bridge_wpa2_chn120_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel120" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -891,10 +933,10 @@ class TestCountryGB20Mhz5GChannel120(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -904,8 +946,7 @@ class TestCountryGB20Mhz5GChannel120(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -923,14 +964,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -940,11 +984,12 @@ class TestCountryGB20Mhz5GChannel124(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 124") + def test_client_bridge_wpa2_chn124_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -954,10 +999,10 @@ class TestCountryGB20Mhz5GChannel124(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -967,8 +1012,7 @@ class TestCountryGB20Mhz5GChannel124(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -986,14 +1030,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-128)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel128(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1003,11 +1050,12 @@ class TestCountryGB20Mhz5GChannel128(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel128 - def test_client_bridge_wpa2_chn128_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 128") + def test_client_bridge_wpa2_chn128_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel128" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1017,10 +1065,10 @@ class TestCountryGB20Mhz5GChannel128(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1030,8 +1078,7 @@ class TestCountryGB20Mhz5GChannel128(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1049,14 +1096,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1066,11 +1116,12 @@ class TestCountryGB20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1080,10 +1131,10 @@ class TestCountryGB20Mhz5GChannel132(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1093,8 +1144,7 @@ class TestCountryGB20Mhz5GChannel132(object): setup_params_general18 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1112,14 +1162,17 @@ setup_params_general18 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general18], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1129,11 +1182,12 @@ class TestCountryGB20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1143,10 +1197,10 @@ class TestCountryGB20Mhz5GChannel136(object): channel = setup_params_general18['rf']['5G']['channel'] channel_width = setup_params_general18['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1156,8 +1210,7 @@ class TestCountryGB20Mhz5GChannel136(object): setup_params_general19 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1175,14 +1228,17 @@ setup_params_general19 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general19], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1192,11 +1248,12 @@ class TestCountryGB20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1206,10 +1263,10 @@ class TestCountryGB20Mhz5GChannel140(object): channel = setup_params_general19['rf']['5G']['channel'] channel_width = setup_params_general19['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1219,8 +1276,7 @@ class TestCountryGB20Mhz5GChannel140(object): setup_params_general20 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1238,14 +1294,17 @@ setup_params_general20 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general20], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1255,11 +1314,12 @@ class TestCountryGB20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1269,10 +1329,10 @@ class TestCountryGB20Mhz5GChannel144(object): channel = setup_params_general20['rf']['5G']['channel'] channel_width = setup_params_general20['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1282,8 +1342,7 @@ class TestCountryGB20Mhz5GChannel144(object): setup_params_general21 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1301,14 +1360,17 @@ setup_params_general21 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general21], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1318,11 +1380,12 @@ class TestCountryGB20Mhz5GChannel149(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 149") + def test_client_bridge_wpa2_chn149_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1332,10 +1395,10 @@ class TestCountryGB20Mhz5GChannel149(object): channel = setup_params_general21['rf']['5G']['channel'] channel_width = setup_params_general21['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1345,8 +1408,7 @@ class TestCountryGB20Mhz5GChannel149(object): setup_params_general22 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1364,14 +1426,17 @@ setup_params_general22 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general22], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-153)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel153(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1381,11 +1446,12 @@ class TestCountryGB20Mhz5GChannel153(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel153 - def test_client_bridge_wpa2_chn153_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 153") + def test_client_bridge_wpa2_chn153_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel153" """ - profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1395,10 +1461,10 @@ class TestCountryGB20Mhz5GChannel153(object): channel = setup_params_general22['rf']['5G']['channel'] channel_width = setup_params_general22['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1408,8 +1474,7 @@ class TestCountryGB20Mhz5GChannel153(object): setup_params_general23 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1427,14 +1492,17 @@ setup_params_general23 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general23], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1444,11 +1512,12 @@ class TestCountryGB20Mhz5GChannel157(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 157") + def test_client_bridge_wpa2_chn157_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1458,10 +1527,10 @@ class TestCountryGB20Mhz5GChannel157(object): channel = setup_params_general23['rf']['5G']['channel'] channel_width = setup_params_general23['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1471,8 +1540,7 @@ class TestCountryGB20Mhz5GChannel157(object): setup_params_general24 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1490,14 +1558,17 @@ setup_params_general24 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general24], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-161)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel161(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1507,11 +1578,12 @@ class TestCountryGB20Mhz5GChannel161(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel161 - def test_client_bridge_wpa2_chn161_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 161") + def test_client_bridge_wpa2_chn161_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel161" """ - profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1521,10 +1593,10 @@ class TestCountryGB20Mhz5GChannel161(object): channel = setup_params_general24['rf']['5G']['channel'] channel_width = setup_params_general24['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -1534,8 +1606,7 @@ class TestCountryGB20Mhz5GChannel161(object): setup_params_general25 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1553,14 +1624,17 @@ setup_params_general25 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general25], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-165)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz5GChannel165(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1570,11 +1644,12 @@ class TestCountryGB20Mhz5GChannel165(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel165 - def test_client_bridge_wpa2_chn165_20Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 165") + def test_client_bridge_wpa2_chn165_20Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel165" """ - profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1584,10 +1659,10 @@ class TestCountryGB20Mhz5GChannel165(object): channel = setup_params_general25['rf']['5G']['channel'] channel_width = setup_params_general25['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/twog_band/test_GB_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/twog_band/test_GB_20Mhz_2g.py index d11b60a8a..686dbfc0d 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/twog_band/test_GB_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_20Mhz/twog_band/test_GB_20Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryGB20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryGB20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryGB20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryGB20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryGB20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryGB20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryGB20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryGB20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryGB20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryGB20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryGB20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryGB20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryGB20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryGB20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryGB20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryGB20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryGB20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryGB20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryGB20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryGB20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryGB20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryGB20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountryGB20Mhz2GChannel12(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 12") + def test_client_bridge_wpa2_chn12_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountryGB20Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("GB country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB20Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountryGB20Mhz2GChannel13(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_20Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 13") + def test_client_bridge_wpa2_chn13_20Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountryGB20Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/fiveg_band/test_GB_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/fiveg_band/test_GB_40Mhz_5g.py index 1077f7c9c..110561505 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/fiveg_band/test_GB_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/fiveg_band/test_GB_40Mhz_5g.py @@ -16,8 +16,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -37,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -54,11 +56,12 @@ class TestCountryGB40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -68,10 +71,10 @@ class TestCountryGB40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -81,8 +84,7 @@ class TestCountryGB40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -102,14 +104,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -119,11 +124,12 @@ class TestCountryGB40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -133,10 +139,10 @@ class TestCountryGB40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -146,8 +152,7 @@ class TestCountryGB40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -167,14 +172,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -184,11 +192,12 @@ class TestCountryGB40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -198,10 +207,10 @@ class TestCountryGB40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -211,8 +220,7 @@ class TestCountryGB40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -230,14 +238,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,11 +258,12 @@ class TestCountryGB40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -261,10 +273,10 @@ class TestCountryGB40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -274,8 +286,7 @@ class TestCountryGB40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -294,14 +305,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,11 +325,12 @@ class TestCountryGB40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -325,10 +340,10 @@ class TestCountryGB40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -338,8 +353,7 @@ class TestCountryGB40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -358,14 +372,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,11 +392,12 @@ class TestCountryGB40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -389,10 +407,10 @@ class TestCountryGB40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -402,8 +420,7 @@ class TestCountryGB40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -422,14 +439,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,11 +459,12 @@ class TestCountryGB40Mhz5GChannel116(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 116") + def test_client_bridge_wpa2_chn116_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -453,10 +474,10 @@ class TestCountryGB40Mhz5GChannel116(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -466,8 +487,7 @@ class TestCountryGB40Mhz5GChannel116(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -486,14 +506,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,11 +526,12 @@ class TestCountryGB40Mhz5GChannel124(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 124") + def test_client_bridge_wpa2_chn124_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -517,10 +541,10 @@ class TestCountryGB40Mhz5GChannel124(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -530,8 +554,7 @@ class TestCountryGB40Mhz5GChannel124(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -550,14 +573,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,11 +593,12 @@ class TestCountryGB40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -581,10 +608,10 @@ class TestCountryGB40Mhz5GChannel132(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -594,8 +621,7 @@ class TestCountryGB40Mhz5GChannel132(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -614,14 +640,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,11 +660,12 @@ class TestCountryGB40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -645,10 +675,10 @@ class TestCountryGB40Mhz5GChannel140(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -658,8 +688,7 @@ class TestCountryGB40Mhz5GChannel140(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -678,14 +707,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,11 +727,12 @@ class TestCountryGB40Mhz5GChannel149(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 149") + def test_client_bridge_wpa2_chn149_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -709,10 +742,10 @@ class TestCountryGB40Mhz5GChannel149(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -722,8 +755,7 @@ class TestCountryGB40Mhz5GChannel149(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -742,14 +774,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,11 +794,12 @@ class TestCountryGB40Mhz5GChannel157(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_40Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 157") + def test_client_bridge_wpa2_chn157_40Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -773,10 +809,10 @@ class TestCountryGB40Mhz5GChannel157(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/twog_band/test_GB_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/twog_band/test_GB_40Mhz_2g.py index f7fcab648..d0e4aa133 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/twog_band/test_GB_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_40Mhz/twog_band/test_GB_40Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryGB40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryGB40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryGB40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryGB40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryGB40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryGB40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryGB40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryGB40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryGB40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryGB40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryGB40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryGB40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryGB40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryGB40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryGB40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryGB40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryGB40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryGB40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryGB40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryGB40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryGB40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryGB40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountryGB40Mhz2GChannel12(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 12") + def test_client_bridge_wpa2_chn12_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountryGB40Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("GB country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB40Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountryGB40Mhz2GChannel13(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_40Mhz_GB_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 13") + def test_client_bridge_wpa2_chn13_40Mhz_GB_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountryGB40Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_80Mhz/fiveg_band/test_GB_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_80Mhz/fiveg_band/test_GB_80Mhz_5g.py index b9cb8af70..1a86b05a0 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_80Mhz/fiveg_band/test_GB_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_GB/channel_width_80Mhz/fiveg_band/test_GB_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryGB80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryGB80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryGB80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryGB80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryGB80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryGB80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryGB80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryGB80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountryGB80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountryGB80Mhz5GChannel116(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountryGB80Mhz5GChannel116(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -268,8 +280,7 @@ class TestCountryGB80Mhz5GChannel116(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -287,14 +298,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -304,11 +318,12 @@ class TestCountryGB80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -318,10 +333,10 @@ class TestCountryGB80Mhz5GChannel132(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: @@ -331,8 +346,7 @@ class TestCountryGB80Mhz5GChannel132(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -350,14 +364,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("GB country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryGB80Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -367,11 +384,12 @@ class TestCountryGB80Mhz5GChannel149(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_80Mhz_GB_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 149") + def test_client_bridge_wpa2_chn149_80Mhz_GB_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -381,10 +399,10 @@ class TestCountryGB80Mhz5GChannel149(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=826, - country='United Kingdom(GB)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=826, + country='United Kingdom(GB)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/fiveg_band/test_IN_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/fiveg_band/test_IN_20Mhz_5g.py index 3ac4aa1a5..17fb5752d 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/fiveg_band/test_IN_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/fiveg_band/test_IN_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -35,14 +34,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,11 +54,12 @@ class TestCountryIN20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -66,10 +69,10 @@ class TestCountryIN20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -79,8 +82,7 @@ class TestCountryIN20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -99,14 +101,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,11 +121,12 @@ class TestCountryIN20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -130,10 +136,10 @@ class TestCountryIN20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryIN20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -162,14 +167,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -179,11 +187,12 @@ class TestCountryIN20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -193,10 +202,10 @@ class TestCountryIN20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -206,8 +215,7 @@ class TestCountryIN20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -226,14 +234,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,11 +254,12 @@ class TestCountryIN20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -257,10 +269,10 @@ class TestCountryIN20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -270,8 +282,7 @@ class TestCountryIN20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -290,14 +301,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -307,11 +321,12 @@ class TestCountryIN20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -321,10 +336,10 @@ class TestCountryIN20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -334,8 +349,7 @@ class TestCountryIN20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -354,14 +368,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -371,11 +388,12 @@ class TestCountryIN20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -385,10 +403,10 @@ class TestCountryIN20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -398,8 +416,7 @@ class TestCountryIN20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -417,14 +434,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -434,11 +454,12 @@ class TestCountryIN20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -448,10 +469,10 @@ class TestCountryIN20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -461,8 +482,7 @@ class TestCountryIN20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -481,14 +501,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -498,11 +521,12 @@ class TestCountryIN20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -512,10 +536,10 @@ class TestCountryIN20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -525,8 +549,7 @@ class TestCountryIN20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -544,14 +567,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -561,11 +587,12 @@ class TestCountryIN20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -575,10 +602,10 @@ class TestCountryIN20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -588,8 +615,7 @@ class TestCountryIN20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -607,14 +633,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -624,11 +653,12 @@ class TestCountryIN20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -638,10 +668,10 @@ class TestCountryIN20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -651,8 +681,7 @@ class TestCountryIN20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -670,14 +699,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -687,11 +719,12 @@ class TestCountryIN20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -701,10 +734,10 @@ class TestCountryIN20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -714,8 +747,7 @@ class TestCountryIN20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -733,14 +765,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -750,11 +785,12 @@ class TestCountryIN20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -764,10 +800,10 @@ class TestCountryIN20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -777,8 +813,7 @@ class TestCountryIN20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -796,14 +831,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -813,11 +851,12 @@ class TestCountryIN20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -827,10 +866,10 @@ class TestCountryIN20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -840,8 +879,7 @@ class TestCountryIN20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -859,14 +897,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -876,11 +917,12 @@ class TestCountryIN20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -890,10 +932,10 @@ class TestCountryIN20Mhz5GChannel132(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -903,8 +945,7 @@ class TestCountryIN20Mhz5GChannel132(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -922,14 +963,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -939,11 +983,12 @@ class TestCountryIN20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -953,10 +998,10 @@ class TestCountryIN20Mhz5GChannel136(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -966,8 +1011,7 @@ class TestCountryIN20Mhz5GChannel136(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -985,14 +1029,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1002,11 +1049,12 @@ class TestCountryIN20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1016,10 +1064,10 @@ class TestCountryIN20Mhz5GChannel140(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -1029,8 +1077,7 @@ class TestCountryIN20Mhz5GChannel140(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1048,14 +1095,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1065,11 +1115,12 @@ class TestCountryIN20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1079,10 +1130,10 @@ class TestCountryIN20Mhz5GChannel144(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/twog_band/test_IN_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/twog_band/test_IN_20Mhz_2g.py index 6d19d912b..b9fa76b8c 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/twog_band/test_IN_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_20Mhz/twog_band/test_IN_20Mhz_2g.py @@ -35,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,7 +55,8 @@ class TestCountryIN20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -66,10 +70,10 @@ class TestCountryIN20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -99,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,7 +123,8 @@ class TestCountryIN20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -130,10 +138,10 @@ class TestCountryIN20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -163,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,7 +191,8 @@ class TestCountryIN20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -194,10 +206,10 @@ class TestCountryIN20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -226,14 +238,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,7 +258,8 @@ class TestCountryIN20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -257,10 +273,10 @@ class TestCountryIN20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -289,14 +305,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,7 +325,8 @@ class TestCountryIN20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -320,10 +340,10 @@ class TestCountryIN20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -352,14 +372,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,7 +392,8 @@ class TestCountryIN20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -383,10 +407,10 @@ class TestCountryIN20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -415,14 +439,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,7 +459,8 @@ class TestCountryIN20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -446,10 +474,10 @@ class TestCountryIN20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -478,14 +506,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,7 +526,8 @@ class TestCountryIN20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -509,10 +541,10 @@ class TestCountryIN20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -541,14 +573,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -558,7 +593,8 @@ class TestCountryIN20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -572,10 +608,10 @@ class TestCountryIN20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -604,14 +640,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -621,7 +660,8 @@ class TestCountryIN20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -635,10 +675,10 @@ class TestCountryIN20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -667,14 +707,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -684,7 +727,8 @@ class TestCountryIN20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -698,10 +742,10 @@ class TestCountryIN20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -730,14 +774,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -747,7 +794,8 @@ class TestCountryIN20Mhz2GChannel12(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 12") + def test_client_bridge_wpa2_chn12_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel12" """ @@ -761,10 +809,10 @@ class TestCountryIN20Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -793,14 +841,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("IN country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN20Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -810,7 +861,8 @@ class TestCountryIN20Mhz2GChannel13(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_20Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 13") + def test_client_bridge_wpa2_chn13_20Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel13" """ @@ -824,10 +876,10 @@ class TestCountryIN20Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/fiveg_band/test_IN_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/fiveg_band/test_IN_40Mhz_5g.py index fcf4f23ee..77d56a820 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/fiveg_band/test_IN_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/fiveg_band/test_IN_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -35,14 +34,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,11 +54,12 @@ class TestCountryIN40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -66,10 +69,10 @@ class TestCountryIN40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -79,8 +82,7 @@ class TestCountryIN40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -99,14 +101,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,11 +121,12 @@ class TestCountryIN40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -130,10 +136,10 @@ class TestCountryIN40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -143,8 +149,7 @@ class TestCountryIN40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -163,14 +168,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,11 +188,12 @@ class TestCountryIN40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -194,10 +203,10 @@ class TestCountryIN40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -207,8 +216,7 @@ class TestCountryIN40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -226,14 +234,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,11 +254,12 @@ class TestCountryIN40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -257,10 +269,10 @@ class TestCountryIN40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -270,8 +282,7 @@ class TestCountryIN40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -289,14 +300,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,11 +320,12 @@ class TestCountryIN40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -320,10 +335,10 @@ class TestCountryIN40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -333,8 +348,7 @@ class TestCountryIN40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -352,14 +366,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,11 +386,12 @@ class TestCountryIN40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -383,10 +401,10 @@ class TestCountryIN40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -396,8 +414,7 @@ class TestCountryIN40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -415,14 +432,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,11 +452,12 @@ class TestCountryIN40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -446,10 +467,10 @@ class TestCountryIN40Mhz5GChannel132(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -459,8 +480,7 @@ class TestCountryIN40Mhz5GChannel132(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -478,14 +498,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,11 +518,12 @@ class TestCountryIN40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -509,10 +533,10 @@ class TestCountryIN40Mhz5GChannel140(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/twog_band/test_IN_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/twog_band/test_IN_40Mhz_2g.py index 2e2cc2896..b7593cb34 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/twog_band/test_IN_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_40Mhz/twog_band/test_IN_40Mhz_2g.py @@ -35,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,7 +55,8 @@ class TestCountryIN40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -66,10 +70,10 @@ class TestCountryIN40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -99,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,7 +123,8 @@ class TestCountryIN40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -130,10 +138,10 @@ class TestCountryIN40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -163,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,7 +191,8 @@ class TestCountryIN40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -194,10 +206,10 @@ class TestCountryIN40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -226,14 +238,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,7 +258,8 @@ class TestCountryIN40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -257,10 +273,10 @@ class TestCountryIN40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -289,14 +305,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,7 +325,8 @@ class TestCountryIN40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -320,10 +340,10 @@ class TestCountryIN40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -352,14 +372,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,7 +392,8 @@ class TestCountryIN40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -383,10 +407,10 @@ class TestCountryIN40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -415,14 +439,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,7 +459,8 @@ class TestCountryIN40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -446,10 +474,10 @@ class TestCountryIN40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -478,14 +506,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,7 +526,8 @@ class TestCountryIN40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -509,10 +541,10 @@ class TestCountryIN40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -541,14 +573,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -558,7 +593,8 @@ class TestCountryIN40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -572,10 +608,10 @@ class TestCountryIN40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -604,14 +640,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -621,7 +660,8 @@ class TestCountryIN40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -635,10 +675,10 @@ class TestCountryIN40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -667,14 +707,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -684,7 +727,8 @@ class TestCountryIN40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -698,10 +742,10 @@ class TestCountryIN40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -730,14 +774,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -747,7 +794,8 @@ class TestCountryIN40Mhz2GChannel12(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 12") + def test_client_bridge_wpa2_chn12_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel12" """ @@ -761,10 +809,10 @@ class TestCountryIN40Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -793,14 +841,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("IN country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN40Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -810,7 +861,8 @@ class TestCountryIN40Mhz2GChannel13(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_40Mhz_IN_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 13") + def test_client_bridge_wpa2_chn13_40Mhz_IN_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel13" """ @@ -824,10 +876,10 @@ class TestCountryIN40Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_80Mhz/fiveg_band/test_IN_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_80Mhz/fiveg_band/test_IN_80Mhz_5g.py index f88f431d1..dfef0fb4a 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_80Mhz/fiveg_band/test_IN_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_IN/channel_width_80Mhz/fiveg_band/test_IN_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryIN80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryIN80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryIN80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryIN80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryIN80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryIN80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryIN80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryIN80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountryIN80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountryIN80Mhz5GChannel116(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountryIN80Mhz5GChannel116(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -268,8 +280,7 @@ class TestCountryIN80Mhz5GChannel116(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -287,14 +298,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -304,11 +318,12 @@ class TestCountryIN80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -318,10 +333,10 @@ class TestCountryIN80Mhz5GChannel132(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: @@ -331,8 +346,7 @@ class TestCountryIN80Mhz5GChannel132(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -350,14 +364,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("IN country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryIN80Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -367,11 +384,12 @@ class TestCountryIN80Mhz5GChannel149(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_80Mhz_IN_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 149") + def test_client_bridge_wpa2_chn149_80Mhz_IN_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -381,10 +399,10 @@ class TestCountryIN80Mhz5GChannel149(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=356, - country='India(IN)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=356, + country='India(IN)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/fiveg_band/test_JP_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/fiveg_band/test_JP_20Mhz_5g.py index 7bea949e4..df0282486 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/fiveg_band/test_JP_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/fiveg_band/test_JP_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -36,15 +35,17 @@ setup_params_general1 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -54,11 +55,12 @@ class TestCountryJP20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -68,10 +70,10 @@ class TestCountryJP20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -81,8 +83,7 @@ class TestCountryJP20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -100,15 +101,17 @@ setup_params_general2 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +121,12 @@ class TestCountryJP20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +136,10 @@ class TestCountryJP20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -144,8 +148,7 @@ class TestCountryJP20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -163,15 +166,17 @@ setup_params_general3 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -181,11 +186,12 @@ class TestCountryJP20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -195,10 +201,10 @@ class TestCountryJP20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -208,8 +214,7 @@ class TestCountryJP20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -227,15 +232,17 @@ setup_params_general4 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -245,11 +252,12 @@ class TestCountryJP20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -259,10 +267,10 @@ class TestCountryJP20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -272,8 +280,7 @@ class TestCountryJP20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -291,15 +298,17 @@ setup_params_general5 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -309,11 +318,12 @@ class TestCountryJP20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -323,10 +333,10 @@ class TestCountryJP20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -336,8 +346,7 @@ class TestCountryJP20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -355,15 +364,17 @@ setup_params_general6 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -373,11 +384,12 @@ class TestCountryJP20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -387,10 +399,10 @@ class TestCountryJP20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -400,8 +412,7 @@ class TestCountryJP20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -418,15 +429,17 @@ setup_params_general7 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -436,11 +449,12 @@ class TestCountryJP20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -450,10 +464,10 @@ class TestCountryJP20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -463,8 +477,7 @@ class TestCountryJP20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -482,15 +495,17 @@ setup_params_general8 = { "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -500,11 +515,12 @@ class TestCountryJP20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -514,10 +530,10 @@ class TestCountryJP20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -527,8 +543,7 @@ class TestCountryJP20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -545,15 +560,17 @@ setup_params_general9 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -563,11 +580,12 @@ class TestCountryJP20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -577,10 +595,10 @@ class TestCountryJP20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -590,8 +608,7 @@ class TestCountryJP20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -608,15 +625,17 @@ setup_params_general10 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -626,11 +645,12 @@ class TestCountryJP20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -640,10 +660,10 @@ class TestCountryJP20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -653,8 +673,7 @@ class TestCountryJP20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -671,15 +690,17 @@ setup_params_general11 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -689,11 +710,12 @@ class TestCountryJP20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -703,10 +725,10 @@ class TestCountryJP20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -716,8 +738,7 @@ class TestCountryJP20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -734,15 +755,17 @@ setup_params_general12 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -752,11 +775,12 @@ class TestCountryJP20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -766,10 +790,10 @@ class TestCountryJP20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -779,8 +803,7 @@ class TestCountryJP20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -797,15 +820,17 @@ setup_params_general13 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -815,11 +840,12 @@ class TestCountryJP20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -829,10 +855,10 @@ class TestCountryJP20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -841,8 +867,7 @@ class TestCountryJP20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -859,15 +884,17 @@ setup_params_general14 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-120)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel120(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -877,11 +904,12 @@ class TestCountryJP20Mhz5GChannel120(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel120 - def test_client_bridge_wpa2_chn120_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 120") + def test_client_bridge_wpa2_chn120_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel120" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -891,10 +919,10 @@ class TestCountryJP20Mhz5GChannel120(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -904,8 +932,7 @@ class TestCountryJP20Mhz5GChannel120(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -922,15 +949,17 @@ setup_params_general15 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -940,11 +969,12 @@ class TestCountryJP20Mhz5GChannel124(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 124") + def test_client_bridge_wpa2_chn124_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -954,10 +984,10 @@ class TestCountryJP20Mhz5GChannel124(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -967,8 +997,7 @@ class TestCountryJP20Mhz5GChannel124(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -985,15 +1014,17 @@ setup_params_general16 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-128)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel128(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1003,11 +1034,12 @@ class TestCountryJP20Mhz5GChannel128(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel128 - def test_client_bridge_wpa2_chn128_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 128") + def test_client_bridge_wpa2_chn128_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel128" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1017,10 +1049,10 @@ class TestCountryJP20Mhz5GChannel128(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1030,8 +1062,7 @@ class TestCountryJP20Mhz5GChannel128(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1048,15 +1079,17 @@ setup_params_general17 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1066,11 +1099,12 @@ class TestCountryJP20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1080,10 +1114,10 @@ class TestCountryJP20Mhz5GChannel132(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1093,8 +1127,7 @@ class TestCountryJP20Mhz5GChannel132(object): setup_params_general18 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1111,15 +1144,17 @@ setup_params_general18 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general18], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1129,11 +1164,12 @@ class TestCountryJP20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1143,10 +1179,10 @@ class TestCountryJP20Mhz5GChannel136(object): channel = setup_params_general18['rf']['5G']['channel'] channel_width = setup_params_general18['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1156,8 +1192,7 @@ class TestCountryJP20Mhz5GChannel136(object): setup_params_general19 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1174,15 +1209,17 @@ setup_params_general19 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general19], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1192,11 +1229,12 @@ class TestCountryJP20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1206,10 +1244,10 @@ class TestCountryJP20Mhz5GChannel140(object): channel = setup_params_general19['rf']['5G']['channel'] channel_width = setup_params_general19['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1219,8 +1257,7 @@ class TestCountryJP20Mhz5GChannel140(object): setup_params_general20 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1237,15 +1274,17 @@ setup_params_general20 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general20], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1255,11 +1294,12 @@ class TestCountryJP20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1269,10 +1309,10 @@ class TestCountryJP20Mhz5GChannel144(object): channel = setup_params_general20['rf']['5G']['channel'] channel_width = setup_params_general20['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1282,8 +1322,7 @@ class TestCountryJP20Mhz5GChannel144(object): setup_params_general21 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1300,15 +1339,17 @@ setup_params_general21 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general21], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1318,11 +1359,12 @@ class TestCountryJP20Mhz5GChannel149(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 149") + def test_client_bridge_wpa2_chn149_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1332,10 +1374,10 @@ class TestCountryJP20Mhz5GChannel149(object): channel = setup_params_general21['rf']['5G']['channel'] channel_width = setup_params_general21['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1345,8 +1387,7 @@ class TestCountryJP20Mhz5GChannel149(object): setup_params_general22 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1363,15 +1404,17 @@ setup_params_general22 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general22], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-153)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel153(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1381,11 +1424,12 @@ class TestCountryJP20Mhz5GChannel153(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel153 - def test_client_bridge_wpa2_chn153_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 153") + def test_client_bridge_wpa2_chn153_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel153" """ - profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1395,10 +1439,10 @@ class TestCountryJP20Mhz5GChannel153(object): channel = setup_params_general22['rf']['5G']['channel'] channel_width = setup_params_general22['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1408,8 +1452,7 @@ class TestCountryJP20Mhz5GChannel153(object): setup_params_general23 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1426,15 +1469,17 @@ setup_params_general23 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general23], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1444,11 +1489,12 @@ class TestCountryJP20Mhz5GChannel157(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 157") + def test_client_bridge_wpa2_chn157_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1458,10 +1504,10 @@ class TestCountryJP20Mhz5GChannel157(object): channel = setup_params_general23['rf']['5G']['channel'] channel_width = setup_params_general23['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1471,8 +1517,7 @@ class TestCountryJP20Mhz5GChannel157(object): setup_params_general24 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1489,15 +1534,17 @@ setup_params_general24 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general24], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-161)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel161(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1507,11 +1554,12 @@ class TestCountryJP20Mhz5GChannel161(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel161 - def test_client_bridge_wpa2_chn161_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 161") + def test_client_bridge_wpa2_chn161_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel161" """ - profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1521,10 +1569,10 @@ class TestCountryJP20Mhz5GChannel161(object): channel = setup_params_general24['rf']['5G']['channel'] channel_width = setup_params_general24['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -1534,8 +1582,7 @@ class TestCountryJP20Mhz5GChannel161(object): setup_params_general25 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1552,15 +1599,17 @@ setup_params_general25 = { }, "radius": False } - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general25], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-165)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz5GChannel165(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1570,11 +1619,12 @@ class TestCountryJP20Mhz5GChannel165(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel165 - def test_client_bridge_wpa2_chn165_20Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 165") + def test_client_bridge_wpa2_chn165_20Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel165" """ - profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1584,10 +1634,10 @@ class TestCountryJP20Mhz5GChannel165(object): channel = setup_params_general25['rf']['5G']['channel'] channel_width = setup_params_general25['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/twog_band/test_JP_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/twog_band/test_JP_20Mhz_2g.py index 81c765ddc..89b8d2fff 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/twog_band/test_JP_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_20Mhz/twog_band/test_JP_20Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryJP20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryJP20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryJP20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryJP20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryJP20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryJP20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryJP20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryJP20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryJP20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryJP20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryJP20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryJP20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryJP20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryJP20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryJP20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryJP20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryJP20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryJP20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryJP20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryJP20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryJP20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryJP20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountryJP20Mhz2GChannel12(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 12") + def test_client_bridge_wpa2_chn12_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountryJP20Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountryJP20Mhz2GChannel13(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 13") + def test_client_bridge_wpa2_chn13_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountryJP20Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -870,14 +922,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("JP country code (Channel-14)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP20Mhz2GChannel14(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -887,7 +942,8 @@ class TestCountryJP20Mhz2GChannel14(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel14 - def test_client_bridge_wpa2_chn14_20Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 14") + def test_client_bridge_wpa2_chn14_20Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel14" """ @@ -901,10 +957,10 @@ class TestCountryJP20Mhz2GChannel14(object): channel = setup_params_general14['rf']['2G']['channel'] channel_width = setup_params_general14['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/fiveg_band/test_JP_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/fiveg_band/test_JP_40Mhz_5g.py index 6dbe223af..d1d306fc5 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/fiveg_band/test_JP_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/fiveg_band/test_JP_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -36,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,11 +55,12 @@ class TestCountryJP40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -67,10 +70,10 @@ class TestCountryJP40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -80,8 +83,7 @@ class TestCountryJP40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountryJP40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountryJP40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -145,8 +151,7 @@ class TestCountryJP40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -166,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,11 +191,12 @@ class TestCountryJP40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -197,10 +206,10 @@ class TestCountryJP40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -210,8 +219,7 @@ class TestCountryJP40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -229,14 +237,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -246,11 +257,12 @@ class TestCountryJP40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -260,10 +272,10 @@ class TestCountryJP40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -273,8 +285,7 @@ class TestCountryJP40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -293,14 +304,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -310,11 +324,12 @@ class TestCountryJP40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -324,10 +339,10 @@ class TestCountryJP40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -337,8 +352,7 @@ class TestCountryJP40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -357,14 +371,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -374,11 +391,12 @@ class TestCountryJP40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -388,10 +406,10 @@ class TestCountryJP40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -401,8 +419,7 @@ class TestCountryJP40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -421,14 +438,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -438,11 +458,12 @@ class TestCountryJP40Mhz5GChannel116(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 116") + def test_client_bridge_wpa2_chn116_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -452,10 +473,10 @@ class TestCountryJP40Mhz5GChannel116(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -465,8 +486,7 @@ class TestCountryJP40Mhz5GChannel116(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -485,14 +505,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -502,11 +525,12 @@ class TestCountryJP40Mhz5GChannel124(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 124") + def test_client_bridge_wpa2_chn124_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -516,10 +540,10 @@ class TestCountryJP40Mhz5GChannel124(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -529,8 +553,7 @@ class TestCountryJP40Mhz5GChannel124(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -549,14 +572,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -566,11 +592,12 @@ class TestCountryJP40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -580,10 +607,10 @@ class TestCountryJP40Mhz5GChannel132(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -593,8 +620,7 @@ class TestCountryJP40Mhz5GChannel132(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -613,14 +639,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -630,11 +659,12 @@ class TestCountryJP40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -644,10 +674,10 @@ class TestCountryJP40Mhz5GChannel140(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -657,8 +687,7 @@ class TestCountryJP40Mhz5GChannel140(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -677,14 +706,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,11 +727,12 @@ class TestCountryJP40Mhz5GChannel149(object): @pytest.mark.fiveg @pytest.mark.channel149 @pytest.mark.checkchannel - def test_client_bridge_wpa2_chn149_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 149") + def test_client_bridge_wpa2_chn149_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -709,10 +742,10 @@ class TestCountryJP40Mhz5GChannel149(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -722,8 +755,7 @@ class TestCountryJP40Mhz5GChannel149(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -742,14 +774,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -760,11 +795,12 @@ class TestCountryJP40Mhz5GChannel157(object): @pytest.mark.fiveg @pytest.mark.channel157 @pytest.mark.checkchannel - def test_client_bridge_wpa2_chn157_40Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 157") + def test_client_bridge_wpa2_chn157_40Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -774,10 +810,10 @@ class TestCountryJP40Mhz5GChannel157(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/twog_band/test_JP_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/twog_band/test_JP_40Mhz_2g.py index d22798b4d..8ddbbdeaf 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/twog_band/test_JP_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_40Mhz/twog_band/test_JP_40Mhz_2g.py @@ -36,14 +36,18 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") + +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +57,8 @@ class TestCountryJP40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -67,10 +72,10 @@ class TestCountryJP40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +106,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +126,8 @@ class TestCountryJP40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -132,10 +141,10 @@ class TestCountryJP40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +175,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +195,8 @@ class TestCountryJP40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -197,10 +210,10 @@ class TestCountryJP40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +243,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +263,8 @@ class TestCountryJP40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -261,10 +278,10 @@ class TestCountryJP40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +311,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +331,8 @@ class TestCountryJP40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -325,10 +346,10 @@ class TestCountryJP40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +379,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +399,8 @@ class TestCountryJP40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -389,10 +414,10 @@ class TestCountryJP40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +447,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +467,8 @@ class TestCountryJP40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -453,10 +482,10 @@ class TestCountryJP40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +515,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +535,8 @@ class TestCountryJP40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -517,10 +550,10 @@ class TestCountryJP40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +583,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +603,8 @@ class TestCountryJP40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -581,10 +618,10 @@ class TestCountryJP40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +651,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +671,8 @@ class TestCountryJP40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -645,10 +686,10 @@ class TestCountryJP40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +719,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +739,8 @@ class TestCountryJP40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -709,10 +754,10 @@ class TestCountryJP40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +787,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +807,8 @@ class TestCountryJP40Mhz2GChannel12(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 12") + def test_client_bridge_wpa2_chn12_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel12" """ @@ -773,10 +822,10 @@ class TestCountryJP40Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +855,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +875,8 @@ class TestCountryJP40Mhz2GChannel13(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 13") + def test_client_bridge_wpa2_chn13_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel13" """ @@ -837,10 +890,10 @@ class TestCountryJP40Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -870,14 +923,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("JP country code (Channel-14)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP40Mhz2GChannel14(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -887,7 +943,8 @@ class TestCountryJP40Mhz2GChannel14(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel14 - def test_client_bridge_wpa2_chn14_40Mhz_JP_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 14") + def test_client_bridge_wpa2_chn14_40Mhz_JP_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel14" """ @@ -901,10 +958,10 @@ class TestCountryJP40Mhz2GChannel14(object): channel = setup_params_general14['rf']['2G']['channel'] channel_width = setup_params_general14['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_80Mhz/fiveg_band/test_JP_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_80Mhz/fiveg_band/test_JP_80Mhz_5g.py index de20ce6ea..de7502130 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_80Mhz/fiveg_band/test_JP_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_JP/channel_width_80Mhz/fiveg_band/test_JP_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("JP country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryJP80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryJP80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryJP80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("JP country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryJP80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryJP80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryJP80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("JP country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryJP80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryJP80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountryJP80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("JP country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryJP80Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountryJP80Mhz5GChannel116(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_80Mhz_JP_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_JP_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountryJP80Mhz5GChannel116(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=392, - country='Japan(JP)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=392, + country='Japan(JP)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/fiveg_band/test_RU_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/fiveg_band/test_RU_20Mhz_5g.py index 457e70131..c7af33a77 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/fiveg_band/test_RU_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/fiveg_band/test_RU_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -37,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -54,11 +56,12 @@ class TestCountryRU20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -68,10 +71,10 @@ class TestCountryRU20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -81,8 +84,7 @@ class TestCountryRU20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountryRU20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountryRU20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -144,8 +150,7 @@ class TestCountryRU20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -164,14 +169,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -181,11 +189,12 @@ class TestCountryRU20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -195,10 +204,10 @@ class TestCountryRU20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -208,8 +217,7 @@ class TestCountryRU20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -228,14 +236,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -245,11 +256,12 @@ class TestCountryRU20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -259,10 +271,10 @@ class TestCountryRU20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -272,8 +284,7 @@ class TestCountryRU20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -292,14 +303,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -309,11 +323,12 @@ class TestCountryRU20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -323,10 +338,10 @@ class TestCountryRU20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -336,8 +351,7 @@ class TestCountryRU20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -356,14 +370,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -373,11 +390,12 @@ class TestCountryRU20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -387,10 +405,10 @@ class TestCountryRU20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -400,8 +418,7 @@ class TestCountryRU20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -419,14 +436,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -436,11 +456,12 @@ class TestCountryRU20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -450,10 +471,10 @@ class TestCountryRU20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -463,8 +484,7 @@ class TestCountryRU20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -483,14 +503,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -500,11 +523,12 @@ class TestCountryRU20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -514,10 +538,10 @@ class TestCountryRU20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -527,8 +551,7 @@ class TestCountryRU20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -546,14 +569,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -563,11 +589,12 @@ class TestCountryRU20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -577,10 +604,10 @@ class TestCountryRU20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -590,8 +617,7 @@ class TestCountryRU20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -609,14 +635,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -626,11 +655,12 @@ class TestCountryRU20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -640,10 +670,10 @@ class TestCountryRU20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -653,8 +683,7 @@ class TestCountryRU20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -672,14 +701,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -689,11 +721,12 @@ class TestCountryRU20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -703,10 +736,10 @@ class TestCountryRU20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -716,8 +749,7 @@ class TestCountryRU20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -735,14 +767,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -752,11 +787,12 @@ class TestCountryRU20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -766,10 +802,10 @@ class TestCountryRU20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -779,8 +815,7 @@ class TestCountryRU20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -798,14 +833,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -815,11 +853,12 @@ class TestCountryRU20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -829,10 +868,10 @@ class TestCountryRU20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -841,8 +880,7 @@ class TestCountryRU20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -860,14 +898,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-120)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel120(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -877,11 +918,12 @@ class TestCountryRU20Mhz5GChannel120(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel120 - def test_client_bridge_wpa2_chn120_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 120") + def test_client_bridge_wpa2_chn120_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel120" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -891,10 +933,10 @@ class TestCountryRU20Mhz5GChannel120(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -904,8 +946,7 @@ class TestCountryRU20Mhz5GChannel120(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -923,14 +964,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -940,11 +984,12 @@ class TestCountryRU20Mhz5GChannel124(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 124") + def test_client_bridge_wpa2_chn124_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -954,10 +999,10 @@ class TestCountryRU20Mhz5GChannel124(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -967,8 +1012,7 @@ class TestCountryRU20Mhz5GChannel124(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -986,14 +1030,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-128)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel128(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1003,11 +1050,12 @@ class TestCountryRU20Mhz5GChannel128(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel128 - def test_client_bridge_wpa2_chn128_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 128") + def test_client_bridge_wpa2_chn128_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel128" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1017,10 +1065,10 @@ class TestCountryRU20Mhz5GChannel128(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1030,8 +1078,7 @@ class TestCountryRU20Mhz5GChannel128(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1049,14 +1096,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1066,11 +1116,12 @@ class TestCountryRU20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1080,10 +1131,10 @@ class TestCountryRU20Mhz5GChannel132(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1093,8 +1144,7 @@ class TestCountryRU20Mhz5GChannel132(object): setup_params_general18 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1112,14 +1162,17 @@ setup_params_general18 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general18], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1129,11 +1182,12 @@ class TestCountryRU20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1143,10 +1197,10 @@ class TestCountryRU20Mhz5GChannel136(object): channel = setup_params_general18['rf']['5G']['channel'] channel_width = setup_params_general18['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1156,8 +1210,7 @@ class TestCountryRU20Mhz5GChannel136(object): setup_params_general19 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1175,14 +1228,17 @@ setup_params_general19 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general19], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1192,11 +1248,12 @@ class TestCountryRU20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1206,10 +1263,10 @@ class TestCountryRU20Mhz5GChannel140(object): channel = setup_params_general19['rf']['5G']['channel'] channel_width = setup_params_general19['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1219,8 +1276,7 @@ class TestCountryRU20Mhz5GChannel140(object): setup_params_general20 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1238,14 +1294,17 @@ setup_params_general20 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general20], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1255,11 +1314,12 @@ class TestCountryRU20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1269,10 +1329,10 @@ class TestCountryRU20Mhz5GChannel144(object): channel = setup_params_general20['rf']['5G']['channel'] channel_width = setup_params_general20['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1282,8 +1342,7 @@ class TestCountryRU20Mhz5GChannel144(object): setup_params_general21 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1301,14 +1360,17 @@ setup_params_general21 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general21], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1318,11 +1380,12 @@ class TestCountryRU20Mhz5GChannel149(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 149") + def test_client_bridge_wpa2_chn149_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1332,10 +1395,10 @@ class TestCountryRU20Mhz5GChannel149(object): channel = setup_params_general21['rf']['5G']['channel'] channel_width = setup_params_general21['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1345,8 +1408,7 @@ class TestCountryRU20Mhz5GChannel149(object): setup_params_general22 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1364,14 +1426,17 @@ setup_params_general22 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general22], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-153)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel153(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1381,11 +1446,12 @@ class TestCountryRU20Mhz5GChannel153(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel153 - def test_client_bridge_wpa2_chn153_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 153") + def test_client_bridge_wpa2_chn153_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel153" """ - profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1395,10 +1461,10 @@ class TestCountryRU20Mhz5GChannel153(object): channel = setup_params_general22['rf']['5G']['channel'] channel_width = setup_params_general22['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1408,8 +1474,7 @@ class TestCountryRU20Mhz5GChannel153(object): setup_params_general23 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1427,14 +1492,17 @@ setup_params_general23 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general23], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1444,11 +1512,12 @@ class TestCountryRU20Mhz5GChannel157(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 157") + def test_client_bridge_wpa2_chn157_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1458,10 +1527,10 @@ class TestCountryRU20Mhz5GChannel157(object): channel = setup_params_general23['rf']['5G']['channel'] channel_width = setup_params_general23['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1471,8 +1540,7 @@ class TestCountryRU20Mhz5GChannel157(object): setup_params_general24 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1490,14 +1558,17 @@ setup_params_general24 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general24], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-161)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel161(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1507,11 +1578,12 @@ class TestCountryRU20Mhz5GChannel161(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel161 - def test_client_bridge_wpa2_chn161_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 161") + def test_client_bridge_wpa2_chn161_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel161" """ - profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1521,10 +1593,10 @@ class TestCountryRU20Mhz5GChannel161(object): channel = setup_params_general24['rf']['5G']['channel'] channel_width = setup_params_general24['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -1534,8 +1606,7 @@ class TestCountryRU20Mhz5GChannel161(object): setup_params_general25 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1553,14 +1624,17 @@ setup_params_general25 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general25], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-165)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz5GChannel165(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1570,11 +1644,12 @@ class TestCountryRU20Mhz5GChannel165(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel165 - def test_client_bridge_wpa2_chn165_20Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 165") + def test_client_bridge_wpa2_chn165_20Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel165" """ - profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1584,10 +1659,10 @@ class TestCountryRU20Mhz5GChannel165(object): channel = setup_params_general25['rf']['5G']['channel'] channel_width = setup_params_general25['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/twog_band/test_RU_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/twog_band/test_RU_20Mhz_2g.py index c0e5b5e8f..c9a20bfbd 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/twog_band/test_RU_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_20Mhz/twog_band/test_RU_20Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryRU20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryRU20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryRU20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryRU20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryRU20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryRU20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryRU20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryRU20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryRU20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryRU20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryRU20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryRU20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryRU20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryRU20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryRU20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryRU20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryRU20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryRU20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryRU20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryRU20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryRU20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryRU20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountryRU20Mhz2GChannel12(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 12") + def test_client_bridge_wpa2_chn12_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountryRU20Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("RU country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU20Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountryRU20Mhz2GChannel13(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_20Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 13") + def test_client_bridge_wpa2_chn13_20Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountryRU20Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/fiveg_band/test_RU_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/fiveg_band/test_RU_40Mhz_5g.py index b82351198..848d533c8 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/fiveg_band/test_RU_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/fiveg_band/test_RU_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -36,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,11 +55,12 @@ class TestCountryRU40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -67,10 +70,10 @@ class TestCountryRU40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -80,8 +83,7 @@ class TestCountryRU40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountryRU40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountryRU40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -145,8 +151,7 @@ class TestCountryRU40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -166,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,11 +191,12 @@ class TestCountryRU40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -197,10 +206,10 @@ class TestCountryRU40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -210,8 +219,7 @@ class TestCountryRU40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -229,14 +237,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -246,11 +257,12 @@ class TestCountryRU40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -260,10 +272,10 @@ class TestCountryRU40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -273,8 +285,7 @@ class TestCountryRU40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -293,14 +304,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -310,11 +324,12 @@ class TestCountryRU40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -324,10 +339,10 @@ class TestCountryRU40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -337,8 +352,7 @@ class TestCountryRU40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -357,14 +371,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -374,11 +391,12 @@ class TestCountryRU40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -388,10 +406,10 @@ class TestCountryRU40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -401,8 +419,7 @@ class TestCountryRU40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -421,14 +438,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -438,11 +458,12 @@ class TestCountryRU40Mhz5GChannel116(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 116") + def test_client_bridge_wpa2_chn116_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -452,10 +473,10 @@ class TestCountryRU40Mhz5GChannel116(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -465,8 +486,7 @@ class TestCountryRU40Mhz5GChannel116(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -485,14 +505,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -502,11 +525,12 @@ class TestCountryRU40Mhz5GChannel124(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 124") + def test_client_bridge_wpa2_chn124_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -516,10 +540,10 @@ class TestCountryRU40Mhz5GChannel124(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -529,8 +553,7 @@ class TestCountryRU40Mhz5GChannel124(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -549,14 +572,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -566,11 +592,12 @@ class TestCountryRU40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -580,10 +607,10 @@ class TestCountryRU40Mhz5GChannel132(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -593,8 +620,7 @@ class TestCountryRU40Mhz5GChannel132(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -613,14 +639,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -630,11 +659,12 @@ class TestCountryRU40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -644,10 +674,10 @@ class TestCountryRU40Mhz5GChannel140(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -657,8 +687,7 @@ class TestCountryRU40Mhz5GChannel140(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -677,14 +706,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -694,11 +726,12 @@ class TestCountryRU40Mhz5GChannel149(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 149") + def test_client_bridge_wpa2_chn149_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -708,10 +741,10 @@ class TestCountryRU40Mhz5GChannel149(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -721,8 +754,7 @@ class TestCountryRU40Mhz5GChannel149(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -741,14 +773,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -758,11 +793,12 @@ class TestCountryRU40Mhz5GChannel157(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_40Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 157") + def test_client_bridge_wpa2_chn157_40Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -772,10 +808,10 @@ class TestCountryRU40Mhz5GChannel157(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/twog_band/test_RU_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/twog_band/test_RU_40Mhz_2g.py index 8e601643d..f9cabf4be 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/twog_band/test_RU_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_40Mhz/twog_band/test_RU_40Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountryRU40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountryRU40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountryRU40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountryRU40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountryRU40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountryRU40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountryRU40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountryRU40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountryRU40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountryRU40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountryRU40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountryRU40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountryRU40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountryRU40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountryRU40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountryRU40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountryRU40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountryRU40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountryRU40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountryRU40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountryRU40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountryRU40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountryRU40Mhz2GChannel12(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 12") + def test_client_bridge_wpa2_chn12_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountryRU40Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("RU country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU40Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountryRU40Mhz2GChannel13(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_40Mhz_RU_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 13") + def test_client_bridge_wpa2_chn13_40Mhz_RU_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountryRU40Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_80Mhz/fiveg_band/test_RU_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_80Mhz/fiveg_band/test_RU_80Mhz_5g.py index 5d1e0b41f..4f36c0457 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_80Mhz/fiveg_band/test_RU_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_RU/channel_width_80Mhz/fiveg_band/test_RU_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryRU80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryRU80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryRU80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryRU80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryRU80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryRU80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryRU80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryRU80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountryRU80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountryRU80Mhz5GChannel116(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountryRU80Mhz5GChannel116(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -268,8 +280,7 @@ class TestCountryRU80Mhz5GChannel116(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -287,14 +298,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -304,11 +318,12 @@ class TestCountryRU80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -318,10 +333,10 @@ class TestCountryRU80Mhz5GChannel132(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: @@ -331,8 +346,7 @@ class TestCountryRU80Mhz5GChannel132(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -350,14 +364,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("RU country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryRU80Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -367,11 +384,12 @@ class TestCountryRU80Mhz5GChannel149(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_80Mhz_RU_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 149") + def test_client_bridge_wpa2_chn149_80Mhz_RU_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -381,10 +399,10 @@ class TestCountryRU80Mhz5GChannel149(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=643, - country='Russia(RU)') + result = result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=643, + country='Russia(RU)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/fiveg_band/test_SG_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/fiveg_band/test_SG_20Mhz_5g.py index b4ec3cafe..d0ef04235 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/fiveg_band/test_SG_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/fiveg_band/test_SG_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -37,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -54,11 +56,12 @@ class TestCountrySG20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -68,10 +71,10 @@ class TestCountrySG20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -81,8 +84,7 @@ class TestCountrySG20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountrySG20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountrySG20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -144,8 +150,7 @@ class TestCountrySG20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -164,14 +169,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -181,11 +189,12 @@ class TestCountrySG20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -195,10 +204,10 @@ class TestCountrySG20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -208,8 +217,7 @@ class TestCountrySG20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -228,14 +236,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -245,11 +256,12 @@ class TestCountrySG20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -259,10 +271,10 @@ class TestCountrySG20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -272,8 +284,7 @@ class TestCountrySG20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -292,14 +303,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -309,11 +323,12 @@ class TestCountrySG20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -323,10 +338,10 @@ class TestCountrySG20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -336,8 +351,7 @@ class TestCountrySG20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -356,14 +370,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -373,11 +390,12 @@ class TestCountrySG20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -387,10 +405,10 @@ class TestCountrySG20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -400,8 +418,7 @@ class TestCountrySG20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -419,14 +436,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -436,11 +456,12 @@ class TestCountrySG20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -450,10 +471,10 @@ class TestCountrySG20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -463,8 +484,7 @@ class TestCountrySG20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -483,14 +503,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -500,11 +523,12 @@ class TestCountrySG20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -514,10 +538,10 @@ class TestCountrySG20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -527,8 +551,7 @@ class TestCountrySG20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -546,14 +569,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -563,11 +589,12 @@ class TestCountrySG20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -577,10 +604,10 @@ class TestCountrySG20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -590,8 +617,7 @@ class TestCountrySG20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -609,14 +635,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -626,11 +655,12 @@ class TestCountrySG20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -640,10 +670,10 @@ class TestCountrySG20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -653,8 +683,7 @@ class TestCountrySG20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -672,14 +701,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -689,11 +721,12 @@ class TestCountrySG20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -703,10 +736,10 @@ class TestCountrySG20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -716,8 +749,7 @@ class TestCountrySG20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -735,14 +767,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -752,11 +787,12 @@ class TestCountrySG20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -766,10 +802,10 @@ class TestCountrySG20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -779,8 +815,7 @@ class TestCountrySG20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -798,14 +833,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -815,11 +853,12 @@ class TestCountrySG20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -829,10 +868,10 @@ class TestCountrySG20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -841,8 +880,7 @@ class TestCountrySG20Mhz5GChannel116(object): setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -860,14 +898,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general14], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-120)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel120(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -877,11 +918,12 @@ class TestCountrySG20Mhz5GChannel120(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel120 - def test_client_bridge_wpa2_chn120_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 120") + def test_client_bridge_wpa2_chn120_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel120" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -891,10 +933,10 @@ class TestCountrySG20Mhz5GChannel120(object): channel = setup_params_general14['rf']['5G']['channel'] channel_width = setup_params_general14['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -904,8 +946,7 @@ class TestCountrySG20Mhz5GChannel120(object): setup_params_general15 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -923,14 +964,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general15], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -940,11 +984,12 @@ class TestCountrySG20Mhz5GChannel124(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 124") + def test_client_bridge_wpa2_chn124_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -954,10 +999,10 @@ class TestCountrySG20Mhz5GChannel124(object): channel = setup_params_general15['rf']['5G']['channel'] channel_width = setup_params_general15['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -967,8 +1012,7 @@ class TestCountrySG20Mhz5GChannel124(object): setup_params_general16 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -986,14 +1030,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general16], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-128)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel128(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1003,11 +1050,12 @@ class TestCountrySG20Mhz5GChannel128(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel128 - def test_client_bridge_wpa2_chn128_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 128") + def test_client_bridge_wpa2_chn128_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel128" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1017,10 +1065,10 @@ class TestCountrySG20Mhz5GChannel128(object): channel = setup_params_general16['rf']['5G']['channel'] channel_width = setup_params_general16['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1030,8 +1078,7 @@ class TestCountrySG20Mhz5GChannel128(object): setup_params_general17 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1049,14 +1096,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1066,11 +1116,12 @@ class TestCountrySG20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1080,10 +1131,10 @@ class TestCountrySG20Mhz5GChannel132(object): channel = setup_params_general17['rf']['5G']['channel'] channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1093,8 +1144,7 @@ class TestCountrySG20Mhz5GChannel132(object): setup_params_general18 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1112,14 +1162,17 @@ setup_params_general18 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general18], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1129,11 +1182,12 @@ class TestCountrySG20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1143,10 +1197,10 @@ class TestCountrySG20Mhz5GChannel136(object): channel = setup_params_general18['rf']['5G']['channel'] channel_width = setup_params_general18['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1156,8 +1210,7 @@ class TestCountrySG20Mhz5GChannel136(object): setup_params_general19 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1175,14 +1228,17 @@ setup_params_general19 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general19], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1192,11 +1248,12 @@ class TestCountrySG20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1206,10 +1263,10 @@ class TestCountrySG20Mhz5GChannel140(object): channel = setup_params_general19['rf']['5G']['channel'] channel_width = setup_params_general19['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1219,8 +1276,7 @@ class TestCountrySG20Mhz5GChannel140(object): setup_params_general20 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1238,14 +1294,17 @@ setup_params_general20 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general20], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1255,11 +1314,12 @@ class TestCountrySG20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1269,10 +1329,10 @@ class TestCountrySG20Mhz5GChannel144(object): channel = setup_params_general20['rf']['5G']['channel'] channel_width = setup_params_general20['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1282,8 +1342,7 @@ class TestCountrySG20Mhz5GChannel144(object): setup_params_general21 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1301,14 +1360,17 @@ setup_params_general21 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general21], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1318,11 +1380,12 @@ class TestCountrySG20Mhz5GChannel149(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 149") + def test_client_bridge_wpa2_chn149_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1332,10 +1395,10 @@ class TestCountrySG20Mhz5GChannel149(object): channel = setup_params_general21['rf']['5G']['channel'] channel_width = setup_params_general21['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1345,8 +1408,7 @@ class TestCountrySG20Mhz5GChannel149(object): setup_params_general22 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1364,14 +1426,17 @@ setup_params_general22 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general22], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-153)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel153(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1381,11 +1446,12 @@ class TestCountrySG20Mhz5GChannel153(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel153 - def test_client_bridge_wpa2_chn153_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 153") + def test_client_bridge_wpa2_chn153_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel153" """ - profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1395,10 +1461,10 @@ class TestCountrySG20Mhz5GChannel153(object): channel = setup_params_general22['rf']['5G']['channel'] channel_width = setup_params_general22['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1408,8 +1474,7 @@ class TestCountrySG20Mhz5GChannel153(object): setup_params_general23 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1427,14 +1492,17 @@ setup_params_general23 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general23], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1444,11 +1512,12 @@ class TestCountrySG20Mhz5GChannel157(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 157") + def test_client_bridge_wpa2_chn157_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1458,10 +1527,10 @@ class TestCountrySG20Mhz5GChannel157(object): channel = setup_params_general23['rf']['5G']['channel'] channel_width = setup_params_general23['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1471,8 +1540,7 @@ class TestCountrySG20Mhz5GChannel157(object): setup_params_general24 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1490,14 +1558,17 @@ setup_params_general24 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general24], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-161)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel161(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1507,11 +1578,12 @@ class TestCountrySG20Mhz5GChannel161(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel161 - def test_client_bridge_wpa2_chn161_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 161") + def test_client_bridge_wpa2_chn161_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel161" """ - profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1521,10 +1593,10 @@ class TestCountrySG20Mhz5GChannel161(object): channel = setup_params_general24['rf']['5G']['channel'] channel_width = setup_params_general24['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -1534,8 +1606,7 @@ class TestCountrySG20Mhz5GChannel161(object): setup_params_general25 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1553,14 +1624,17 @@ setup_params_general25 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general25], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-165)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz5GChannel165(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1570,11 +1644,12 @@ class TestCountrySG20Mhz5GChannel165(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel165 - def test_client_bridge_wpa2_chn165_20Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 165") + def test_client_bridge_wpa2_chn165_20Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel165" """ - profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -1584,10 +1659,10 @@ class TestCountrySG20Mhz5GChannel165(object): channel = setup_params_general25['rf']['5G']['channel'] channel_width = setup_params_general25['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/twog_band/test_SG_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/twog_band/test_SG_20Mhz_2g.py index 325c041a6..27386ad68 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/twog_band/test_SG_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_20Mhz/twog_band/test_SG_20Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountrySG20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountrySG20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountrySG20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountrySG20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountrySG20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountrySG20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountrySG20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountrySG20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountrySG20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountrySG20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountrySG20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountrySG20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountrySG20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountrySG20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountrySG20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountrySG20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountrySG20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountrySG20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountrySG20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountrySG20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountrySG20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountrySG20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountrySG20Mhz2GChannel12(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 12") + def test_client_bridge_wpa2_chn12_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountrySG20Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("SG country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG20Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountrySG20Mhz2GChannel13(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_20Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 13") + def test_client_bridge_wpa2_chn13_20Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountrySG20Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/fiveg_band/test_SG_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/fiveg_band/test_SG_40Mhz_5g.py index 689b679eb..41f0bb5fe 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/fiveg_band/test_SG_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/fiveg_band/test_SG_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -36,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,11 +55,12 @@ class TestCountrySG40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -67,10 +70,10 @@ class TestCountrySG40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -80,8 +83,7 @@ class TestCountrySG40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -101,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,11 +123,12 @@ class TestCountrySG40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -132,10 +138,10 @@ class TestCountrySG40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -145,8 +151,7 @@ class TestCountrySG40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -166,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,11 +191,12 @@ class TestCountrySG40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -197,10 +206,10 @@ class TestCountrySG40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -210,8 +219,7 @@ class TestCountrySG40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -229,14 +237,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -246,11 +257,12 @@ class TestCountrySG40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -260,10 +272,10 @@ class TestCountrySG40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -273,8 +285,7 @@ class TestCountrySG40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -293,14 +304,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -310,11 +324,12 @@ class TestCountrySG40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -324,10 +339,10 @@ class TestCountrySG40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -337,8 +352,7 @@ class TestCountrySG40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -357,14 +371,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -374,11 +391,12 @@ class TestCountrySG40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -388,10 +406,10 @@ class TestCountrySG40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -401,8 +419,7 @@ class TestCountrySG40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -421,14 +438,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -438,11 +458,12 @@ class TestCountrySG40Mhz5GChannel116(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 116") + def test_client_bridge_wpa2_chn116_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -452,10 +473,10 @@ class TestCountrySG40Mhz5GChannel116(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -465,8 +486,7 @@ class TestCountrySG40Mhz5GChannel116(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -485,14 +505,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel124(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -502,11 +525,12 @@ class TestCountrySG40Mhz5GChannel124(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel124 - def test_client_bridge_wpa2_chn124_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 124") + def test_client_bridge_wpa2_chn124_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel124" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -516,10 +540,10 @@ class TestCountrySG40Mhz5GChannel124(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -529,8 +553,7 @@ class TestCountrySG40Mhz5GChannel124(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -549,14 +572,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -566,11 +592,12 @@ class TestCountrySG40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -580,10 +607,10 @@ class TestCountrySG40Mhz5GChannel132(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -593,8 +620,7 @@ class TestCountrySG40Mhz5GChannel132(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -613,14 +639,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -630,11 +659,12 @@ class TestCountrySG40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -644,10 +674,10 @@ class TestCountrySG40Mhz5GChannel140(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -657,8 +687,7 @@ class TestCountrySG40Mhz5GChannel140(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -677,14 +706,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -694,11 +726,12 @@ class TestCountrySG40Mhz5GChannel149(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 149") + def test_client_bridge_wpa2_chn149_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -708,10 +741,10 @@ class TestCountrySG40Mhz5GChannel149(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -721,8 +754,7 @@ class TestCountrySG40Mhz5GChannel149(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": { "5G": @@ -741,14 +773,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz5GChannel157(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -758,11 +793,12 @@ class TestCountrySG40Mhz5GChannel157(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel157 - def test_client_bridge_wpa2_chn157_40Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 157") + def test_client_bridge_wpa2_chn157_40Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel157" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -772,10 +808,10 @@ class TestCountrySG40Mhz5GChannel157(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/twog_band/test_SG_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/twog_band/test_SG_40Mhz_2g.py index a300197fe..5856adf61 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/twog_band/test_SG_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_40Mhz/twog_band/test_SG_40Mhz_2g.py @@ -36,14 +36,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -53,7 +56,8 @@ class TestCountrySG40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -67,10 +71,10 @@ class TestCountrySG40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -101,14 +105,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -118,7 +125,8 @@ class TestCountrySG40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -132,10 +140,10 @@ class TestCountrySG40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -166,14 +174,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -183,7 +194,8 @@ class TestCountrySG40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -197,10 +209,10 @@ class TestCountrySG40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -230,14 +242,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -247,7 +262,8 @@ class TestCountrySG40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -261,10 +277,10 @@ class TestCountrySG40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -294,14 +310,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -311,7 +330,8 @@ class TestCountrySG40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -325,10 +345,10 @@ class TestCountrySG40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -358,14 +378,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -375,7 +398,8 @@ class TestCountrySG40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -389,10 +413,10 @@ class TestCountrySG40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -422,14 +446,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -439,7 +466,8 @@ class TestCountrySG40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -453,10 +481,10 @@ class TestCountrySG40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -486,14 +514,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -503,7 +534,8 @@ class TestCountrySG40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -517,10 +549,10 @@ class TestCountrySG40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -550,14 +582,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -567,7 +602,8 @@ class TestCountrySG40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -581,10 +617,10 @@ class TestCountrySG40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -614,14 +650,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -631,7 +670,8 @@ class TestCountrySG40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -645,10 +685,10 @@ class TestCountrySG40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -678,14 +718,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -695,7 +738,8 @@ class TestCountrySG40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -709,10 +753,10 @@ class TestCountrySG40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -742,14 +786,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-12)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel12(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -759,7 +806,8 @@ class TestCountrySG40Mhz2GChannel12(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel12 - def test_client_bridge_wpa2_chn12_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 12") + def test_client_bridge_wpa2_chn12_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel12" """ @@ -773,10 +821,10 @@ class TestCountrySG40Mhz2GChannel12(object): channel = setup_params_general12['rf']['2G']['channel'] channel_width = setup_params_general12['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -806,14 +854,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("SG country code (Channel-13)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG40Mhz2GChannel13(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -823,7 +874,8 @@ class TestCountrySG40Mhz2GChannel13(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel13 - def test_client_bridge_wpa2_chn13_40Mhz_SG_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 13") + def test_client_bridge_wpa2_chn13_40Mhz_SG_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel13" """ @@ -837,10 +889,10 @@ class TestCountrySG40Mhz2GChannel13(object): channel = setup_params_general13['rf']['2G']['channel'] channel_width = setup_params_general13['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_80Mhz/fiveg_band/test_SG_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_80Mhz/fiveg_band/test_SG_80Mhz_5g.py index eb7983ce4..8630094fb 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_80Mhz/fiveg_band/test_SG_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_SG/channel_width_80Mhz/fiveg_band/test_SG_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountrySG80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountrySG80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountrySG80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountrySG80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountrySG80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountrySG80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountrySG80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountrySG80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,7 @@ class TestCountrySG80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +232,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,11 +252,12 @@ class TestCountrySG80Mhz5GChannel116(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -255,10 +267,10 @@ class TestCountrySG80Mhz5GChannel116(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -268,8 +280,7 @@ class TestCountrySG80Mhz5GChannel116(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -287,14 +298,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -304,11 +318,12 @@ class TestCountrySG80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -318,10 +333,10 @@ class TestCountrySG80Mhz5GChannel132(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: @@ -331,8 +346,7 @@ class TestCountrySG80Mhz5GChannel132(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -350,14 +364,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("SG country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") class TestCountrySG80Mhz5GChannel149(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -367,11 +384,12 @@ class TestCountrySG80Mhz5GChannel149(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel149 - def test_client_bridge_wpa2_chn149_80Mhz_SG_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 149") + def test_client_bridge_wpa2_chn149_80Mhz_SG_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel149" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -381,10 +399,10 @@ class TestCountrySG80Mhz5GChannel149(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=702, - country='Singapore(SG)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=702, + country='Singapore(SG)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/fiveg_band/test_US_20Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/fiveg_band/test_US_20Mhz_5g.py index 792894247..7393e989a 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/fiveg_band/test_US_20Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/fiveg_band/test_US_20Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -35,14 +34,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,11 +54,12 @@ class TestCountryUS20Mhz5GChannel36(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 36") + def test_client_bridge_wpa2_chn36_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -66,10 +69,10 @@ class TestCountryUS20Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -79,8 +82,7 @@ class TestCountryUS20Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -99,14 +101,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-40)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel40(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,11 +121,12 @@ class TestCountryUS20Mhz5GChannel40(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel40 - def test_client_bridge_wpa2_chn40_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 40") + def test_client_bridge_wpa2_chn40_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel40" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -130,10 +136,10 @@ class TestCountryUS20Mhz5GChannel40(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryUS20Mhz5GChannel40(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -162,14 +167,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -179,11 +187,12 @@ class TestCountryUS20Mhz5GChannel44(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 44") + def test_client_bridge_wpa2_chn44_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -193,10 +202,10 @@ class TestCountryUS20Mhz5GChannel44(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -206,8 +215,7 @@ class TestCountryUS20Mhz5GChannel44(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -226,14 +234,17 @@ setup_params_general4 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-48)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel48(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,11 +254,12 @@ class TestCountryUS20Mhz5GChannel48(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel48 - def test_client_bridge_wpa2_chn48_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 48") + def test_client_bridge_wpa2_chn48_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel48" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -257,10 +269,10 @@ class TestCountryUS20Mhz5GChannel48(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -270,8 +282,7 @@ class TestCountryUS20Mhz5GChannel48(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -290,14 +301,17 @@ setup_params_general5 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -307,11 +321,12 @@ class TestCountryUS20Mhz5GChannel52(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 52") + def test_client_bridge_wpa2_chn52_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -321,10 +336,10 @@ class TestCountryUS20Mhz5GChannel52(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -334,8 +349,7 @@ class TestCountryUS20Mhz5GChannel52(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -354,14 +368,17 @@ setup_params_general6 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-56)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel56(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -371,11 +388,12 @@ class TestCountryUS20Mhz5GChannel56(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel56 - def test_client_bridge_wpa2_chn56_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 56") + def test_client_bridge_wpa2_chn56_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel56" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -385,10 +403,10 @@ class TestCountryUS20Mhz5GChannel56(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -398,8 +416,7 @@ class TestCountryUS20Mhz5GChannel56(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -417,14 +434,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -434,11 +454,12 @@ class TestCountryUS20Mhz5GChannel60(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 60") + def test_client_bridge_wpa2_chn60_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -448,10 +469,10 @@ class TestCountryUS20Mhz5GChannel60(object): channel = setup_params_general7['rf']['5G']['channel'] channel_width = setup_params_general7['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -461,8 +482,7 @@ class TestCountryUS20Mhz5GChannel60(object): setup_params_general8 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -481,14 +501,17 @@ setup_params_general8 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-64)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel64(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -498,11 +521,12 @@ class TestCountryUS20Mhz5GChannel64(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel64 - def test_client_bridge_wpa2_chn64_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 64") + def test_client_bridge_wpa2_chn64_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel64" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -512,10 +536,10 @@ class TestCountryUS20Mhz5GChannel64(object): channel = setup_params_general8['rf']['5G']['channel'] channel_width = setup_params_general8['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -525,8 +549,7 @@ class TestCountryUS20Mhz5GChannel64(object): setup_params_general9 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -544,14 +567,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -561,11 +587,12 @@ class TestCountryUS20Mhz5GChannel100(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 100") + def test_client_bridge_wpa2_chn100_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -575,10 +602,10 @@ class TestCountryUS20Mhz5GChannel100(object): channel = setup_params_general9['rf']['5G']['channel'] channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -588,8 +615,7 @@ class TestCountryUS20Mhz5GChannel100(object): setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -607,14 +633,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-104)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel104(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -624,11 +653,12 @@ class TestCountryUS20Mhz5GChannel104(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel104 - def test_client_bridge_wpa2_chn104_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 104") + def test_client_bridge_wpa2_chn104_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel104" """ - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -638,10 +668,10 @@ class TestCountryUS20Mhz5GChannel104(object): channel = setup_params_general10['rf']['5G']['channel'] channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -651,8 +681,7 @@ class TestCountryUS20Mhz5GChannel104(object): setup_params_general11 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -670,14 +699,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -687,11 +719,12 @@ class TestCountryUS20Mhz5GChannel108(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 108") + def test_client_bridge_wpa2_chn108_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -701,10 +734,10 @@ class TestCountryUS20Mhz5GChannel108(object): channel = setup_params_general11['rf']['5G']['channel'] channel_width = setup_params_general11['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -714,8 +747,7 @@ class TestCountryUS20Mhz5GChannel108(object): setup_params_general12 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -733,14 +765,17 @@ setup_params_general12 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general12], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-112)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel112(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -750,11 +785,12 @@ class TestCountryUS20Mhz5GChannel112(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel112 - def test_client_bridge_wpa2_chn112_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 112") + def test_client_bridge_wpa2_chn112_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel112" """ - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -764,10 +800,10 @@ class TestCountryUS20Mhz5GChannel112(object): channel = setup_params_general12['rf']['5G']['channel'] channel_width = setup_params_general12['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -777,8 +813,7 @@ class TestCountryUS20Mhz5GChannel112(object): setup_params_general13 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -796,14 +831,17 @@ setup_params_general13 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general13], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel116(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -813,11 +851,12 @@ class TestCountryUS20Mhz5GChannel116(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel116 - def test_client_bridge_wpa2_chn116_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 116") + def test_client_bridge_wpa2_chn116_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel116" """ - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -827,21 +866,220 @@ class TestCountryUS20Mhz5GChannel116(object): channel = setup_params_general13['rf']['5G']['channel'] channel_width = setup_params_general13['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False +# TODO-(120,124,128) + setup_params_general14 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 120}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general14], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-120)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel120(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel120 + @allure.title("Test for bandwidth 20 and channel 120") + def test_client_bridge_wpa2_chn120_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel120" + """ + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general14['rf']['5G']['channel'] + channel_width = setup_params_general14['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general15 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 124}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general15], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel124(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel124 + @allure.title("Test for bandwidth 20 and channel 124") + def test_client_bridge_wpa2_chn124_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel124" + """ + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general15['rf']['5G']['channel'] + channel_width = setup_params_general15['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general16 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 128}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general16], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-128)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel128(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel128 + @allure.title("Test for bandwidth 20 and channel 128") + def test_client_bridge_wpa2_chn128_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel128" + """ + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general16['rf']['5G']['channel'] + channel_width = setup_params_general16['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general17 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -859,14 +1097,17 @@ setup_params_general14 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], + 'setup_configuration', + [setup_params_general17], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -876,35 +1117,35 @@ class TestCountryUS20Mhz5GChannel132(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 132") + def test_client_bridge_wpa2_chn132_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general14['rf']['5G']['channel'] - channel_width = setup_params_general14['rf']['5G']['channel-width'] + channel = setup_params_general17['rf']['5G']['channel'] + channel_width = setup_params_general17['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False -setup_params_general15 = { +setup_params_general18 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -922,14 +1163,17 @@ setup_params_general15 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], + 'setup_configuration', + [setup_params_general18], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-136)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel136(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -939,35 +1183,35 @@ class TestCountryUS20Mhz5GChannel136(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel136 - def test_client_bridge_wpa2_chn136_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 136") + def test_client_bridge_wpa2_chn136_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel136" """ - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general18["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general15['rf']['5G']['channel'] - channel_width = setup_params_general15['rf']['5G']['channel-width'] + channel = setup_params_general18['rf']['5G']['channel'] + channel_width = setup_params_general18['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False -setup_params_general16 = { +setup_params_general19 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -985,14 +1229,17 @@ setup_params_general16 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], + 'setup_configuration', + [setup_params_general19], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1002,35 +1249,35 @@ class TestCountryUS20Mhz5GChannel140(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 140") + def test_client_bridge_wpa2_chn140_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general19["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general16['rf']['5G']['channel'] - channel_width = setup_params_general16['rf']['5G']['channel-width'] + channel = setup_params_general19['rf']['5G']['channel'] + channel_width = setup_params_general19['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False -setup_params_general17 = { +setup_params_general20 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -1048,14 +1295,17 @@ setup_params_general17 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], + 'setup_configuration', + [setup_params_general20], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-144)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz5GChannel144(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -1065,25 +1315,358 @@ class TestCountryUS20Mhz5GChannel144(object): @pytest.mark.twentyMhz @pytest.mark.fiveg @pytest.mark.channel144 - def test_client_bridge_wpa2_chn144_20Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 20 and channel 144") + def test_client_bridge_wpa2_chn144_20Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel144" """ - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general20["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general17['rf']['5G']['channel'] - channel_width = setup_params_general17['rf']['5G']['channel-width'] + channel = setup_params_general20['rf']['5G']['channel'] + channel_width = setup_params_general20['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False + +setup_params_general21 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 149}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general21], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel149(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel149 + @allure.title("Test for bandwidth 20 and channel 149") + def test_client_bridge_wpa2_chn149_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel149" + """ + profile_data = setup_params_general21["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general21['rf']['5G']['channel'] + channel_width = setup_params_general21['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general22 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 153}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general22], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-153)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel153(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel153 + @allure.title("Test for bandwidth 20 and channel 153") + def test_client_bridge_wpa2_chn153_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel153" + """ + profile_data = setup_params_general22["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general22['rf']['5G']['channel'] + channel_width = setup_params_general22['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general23 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 157}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general23], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel157(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel157 + @allure.title("Test for bandwidth 20 and channel 157") + def test_client_bridge_wpa2_chn157_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel157" + """ + profile_data = setup_params_general23["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general23['rf']['5G']['channel'] + channel_width = setup_params_general23['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general24 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 161}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general24], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-161)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel161(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel161 + @allure.title("Test for bandwidth 20 and channel 161") + def test_client_bridge_wpa2_chn161_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel161" + """ + profile_data = setup_params_general24["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general24['rf']['5G']['channel'] + channel_width = setup_params_general24['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general25 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 20, + "channel": 165}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general25], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-165)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS20Mhz5GChannel165(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiveg + @pytest.mark.channel165 + @pytest.mark.cc_karthika + @allure.title("Test for bandwidth 20 and channel 165") + def test_client_bridge_wpa2_chn165_20Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and twentyMhz and wpa2 and fiveg and channel165" + """ + profile_data = setup_params_general25["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general25['rf']['5G']['channel'] + channel_width = setup_params_general25['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/twog_band/test_US_20Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/twog_band/test_US_20Mhz_2g.py index 98672a758..6cd3686dc 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/twog_band/test_US_20Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_20Mhz/twog_band/test_US_20Mhz_2g.py @@ -35,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,7 +55,8 @@ class TestCountryUS20Mhz2GChannel1(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 1") + def test_client_bridge_wpa2_chn1_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel1" """ @@ -66,10 +70,10 @@ class TestCountryUS20Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -99,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,7 +123,8 @@ class TestCountryUS20Mhz2GChannel2(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 2") + def test_client_bridge_wpa2_chn2_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel2" """ @@ -130,10 +138,10 @@ class TestCountryUS20Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -163,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,7 +191,8 @@ class TestCountryUS20Mhz2GChannel3(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 3") + def test_client_bridge_wpa2_chn3_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel3" """ @@ -194,10 +206,10 @@ class TestCountryUS20Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -226,14 +238,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,7 +258,8 @@ class TestCountryUS20Mhz2GChannel4(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 4") + def test_client_bridge_wpa2_chn4_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel4" """ @@ -257,10 +273,10 @@ class TestCountryUS20Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -289,14 +305,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,7 +325,8 @@ class TestCountryUS20Mhz2GChannel5(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 5") + def test_client_bridge_wpa2_chn5_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel5" """ @@ -320,10 +340,10 @@ class TestCountryUS20Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -352,14 +372,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,7 +392,8 @@ class TestCountryUS20Mhz2GChannel6(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 6") + def test_client_bridge_wpa2_chn6_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel6" """ @@ -383,10 +407,10 @@ class TestCountryUS20Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -415,14 +439,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,7 +459,8 @@ class TestCountryUS20Mhz2GChannel7(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 7") + def test_client_bridge_wpa2_chn7_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel7" """ @@ -446,10 +474,10 @@ class TestCountryUS20Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -478,14 +506,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,7 +526,8 @@ class TestCountryUS20Mhz2GChannel8(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 8") + def test_client_bridge_wpa2_chn8_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel8" """ @@ -509,10 +541,10 @@ class TestCountryUS20Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -541,14 +573,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -558,7 +593,8 @@ class TestCountryUS20Mhz2GChannel9(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 9") + def test_client_bridge_wpa2_chn9_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel9" """ @@ -572,10 +608,10 @@ class TestCountryUS20Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -604,14 +640,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -621,7 +660,8 @@ class TestCountryUS20Mhz2GChannel10(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 10") + def test_client_bridge_wpa2_chn10_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel10" """ @@ -635,10 +675,10 @@ class TestCountryUS20Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -667,14 +707,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(20 MHz)") +@allure.sub_suite("US country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS20Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -684,7 +727,8 @@ class TestCountryUS20Mhz2GChannel11(object): @pytest.mark.twentyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_20Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 20 and channel 11") + def test_client_bridge_wpa2_chn11_20Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and twentyMhz and wpa2 and twog and channel11" """ @@ -698,10 +742,10 @@ class TestCountryUS20Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/fiveg_band/test_US_40Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/fiveg_band/test_US_40Mhz_5g.py index 007d38ff3..5fea54a81 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/fiveg_band/test_US_40Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/fiveg_band/test_US_40Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -35,14 +34,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,11 +54,12 @@ class TestCountryUS40Mhz5GChannel36(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 36") + def test_client_bridge_wpa2_chn36_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -66,10 +69,10 @@ class TestCountryUS40Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -79,8 +82,7 @@ class TestCountryUS40Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -99,14 +101,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-44)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel44(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,11 +121,12 @@ class TestCountryUS40Mhz5GChannel44(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel44 - def test_client_bridge_wpa2_chn44_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 44") + def test_client_bridge_wpa2_chn44_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel44" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -130,10 +136,10 @@ class TestCountryUS40Mhz5GChannel44(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -143,8 +149,7 @@ class TestCountryUS40Mhz5GChannel44(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -163,14 +168,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,11 +188,12 @@ class TestCountryUS40Mhz5GChannel52(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 52") + def test_client_bridge_wpa2_chn52_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -194,10 +203,10 @@ class TestCountryUS40Mhz5GChannel52(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -207,8 +216,7 @@ class TestCountryUS40Mhz5GChannel52(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -226,14 +234,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-60)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel60(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,11 +254,12 @@ class TestCountryUS40Mhz5GChannel60(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel60 - def test_client_bridge_wpa2_chn60_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 60") + def test_client_bridge_wpa2_chn60_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel60" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -257,10 +269,10 @@ class TestCountryUS40Mhz5GChannel60(object): channel = setup_params_general4['rf']['5G']['channel'] channel_width = setup_params_general4['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -270,8 +282,7 @@ class TestCountryUS40Mhz5GChannel60(object): setup_params_general5 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -289,14 +300,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,11 +320,12 @@ class TestCountryUS40Mhz5GChannel100(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 100") + def test_client_bridge_wpa2_chn100_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -320,10 +335,10 @@ class TestCountryUS40Mhz5GChannel100(object): channel = setup_params_general5['rf']['5G']['channel'] channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -333,8 +348,7 @@ class TestCountryUS40Mhz5GChannel100(object): setup_params_general6 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -352,14 +366,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-108)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel108(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,11 +386,12 @@ class TestCountryUS40Mhz5GChannel108(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel108 - def test_client_bridge_wpa2_chn108_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 108") + def test_client_bridge_wpa2_chn108_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel108" """ - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -383,10 +401,10 @@ class TestCountryUS40Mhz5GChannel108(object): channel = setup_params_general6['rf']['5G']['channel'] channel_width = setup_params_general6['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -396,8 +414,139 @@ class TestCountryUS40Mhz5GChannel108(object): setup_params_general7 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 40, + "channel": 116}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general7], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS40Mhz5GChannel116(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + @pytest.mark.fiveg + @pytest.mark.channel116 + @allure.title("Test for bandwidth 40 and channel 116") + def test_client_bridge_wpa2_chn116_40Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel116" + """ + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general7['rf']['5G']['channel'] + channel_width = setup_params_general7['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general8 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general8], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-124)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS40Mhz5GChannel124(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + @pytest.mark.fiveg + @pytest.mark.channel124 + @allure.title("Test for bandwidth 40 and channel 124") + def test_client_bridge_wpa2_chn124_40Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel124" + """ + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general8['rf']['5G']['channel'] + channel_width = setup_params_general8['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general9 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -415,14 +564,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], + 'setup_configuration', + [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,35 +584,35 @@ class TestCountryUS40Mhz5GChannel132(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 132") + def test_client_bridge_wpa2_chn132_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general7['rf']['5G']['channel'] - channel_width = setup_params_general7['rf']['5G']['channel-width'] + channel = setup_params_general9['rf']['5G']['channel'] + channel_width = setup_params_general9['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False -setup_params_general8 = { +setup_params_general10 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -478,14 +630,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], + 'setup_configuration', + [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-140)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz5GChannel140(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,25 +650,160 @@ class TestCountryUS40Mhz5GChannel140(object): @pytest.mark.fourtyMhz @pytest.mark.fiveg @pytest.mark.channel140 - def test_client_bridge_wpa2_chn140_40Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 40 and channel 140") + def test_client_bridge_wpa2_chn140_40Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel140" """ - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general8['rf']['5G']['channel'] - channel_width = setup_params_general8['rf']['5G']['channel-width'] + channel = setup_params_general10['rf']['5G']['channel'] + channel_width = setup_params_general10['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: assert False + + +setup_params_general11 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 40, + "channel": 149}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general11], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS40Mhz5GChannel149(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + @pytest.mark.fiveg + @pytest.mark.channel149 + @allure.title("Test for bandwidth 40 and channel 149") + def test_client_bridge_wpa2_chn149_40Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel149" + """ + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general11['rf']['5G']['channel'] + channel_width = setup_params_general11['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general12 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 40, + "channel": 157}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general12], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-157)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS40Mhz5GChannel157(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + @pytest.mark.fiveg + @pytest.mark.channel157 + @allure.title("Test for bandwidth 40 and channel 157") + def test_client_bridge_wpa2_chn157_40Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and fourtyMhz and wpa2 and fiveg and channel157" + """ + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general12['rf']['5G']['channel'] + channel_width = setup_params_general12['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/twog_band/test_US_40Mhz_2g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/twog_band/test_US_40Mhz_2g.py index ebedaa984..cd57379ed 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/twog_band/test_US_40Mhz_2g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_40Mhz/twog_band/test_US_40Mhz_2g.py @@ -35,14 +35,17 @@ setup_params_general1 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-1)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel1(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -52,7 +55,8 @@ class TestCountryUS40Mhz2GChannel1(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel1 - def test_client_bridge_wpa2_chn1_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 1") + def test_client_bridge_wpa2_chn1_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel1" """ @@ -66,10 +70,10 @@ class TestCountryUS40Mhz2GChannel1(object): channel = setup_params_general1['rf']['2G']['channel'] channel_width = setup_params_general1['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -99,14 +103,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-2)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel2(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -116,7 +123,8 @@ class TestCountryUS40Mhz2GChannel2(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel2 - def test_client_bridge_wpa2_chn2_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 2") + def test_client_bridge_wpa2_chn2_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel2" """ @@ -130,10 +138,10 @@ class TestCountryUS40Mhz2GChannel2(object): channel = setup_params_general2['rf']['2G']['channel'] channel_width = setup_params_general2['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -163,14 +171,17 @@ setup_params_general3 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-3)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel3(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -180,7 +191,8 @@ class TestCountryUS40Mhz2GChannel3(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel3 - def test_client_bridge_wpa2_chn3_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 3") + def test_client_bridge_wpa2_chn3_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel3" """ @@ -194,10 +206,10 @@ class TestCountryUS40Mhz2GChannel3(object): channel = setup_params_general3['rf']['2G']['channel'] channel_width = setup_params_general3['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -226,14 +238,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-4)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel4(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -243,7 +258,8 @@ class TestCountryUS40Mhz2GChannel4(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel4 - def test_client_bridge_wpa2_chn4_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 4") + def test_client_bridge_wpa2_chn4_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel4" """ @@ -257,10 +273,10 @@ class TestCountryUS40Mhz2GChannel4(object): channel = setup_params_general4['rf']['2G']['channel'] channel_width = setup_params_general4['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -289,14 +305,17 @@ setup_params_general5 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-5)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel5(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -306,7 +325,8 @@ class TestCountryUS40Mhz2GChannel5(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel5 - def test_client_bridge_wpa2_chn5_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 5") + def test_client_bridge_wpa2_chn5_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel5" """ @@ -320,10 +340,10 @@ class TestCountryUS40Mhz2GChannel5(object): channel = setup_params_general5['rf']['2G']['channel'] channel_width = setup_params_general5['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -352,14 +372,17 @@ setup_params_general6 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general6], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-6)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel6(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -369,7 +392,8 @@ class TestCountryUS40Mhz2GChannel6(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel6 - def test_client_bridge_wpa2_chn6_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 6") + def test_client_bridge_wpa2_chn6_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel6" """ @@ -383,10 +407,10 @@ class TestCountryUS40Mhz2GChannel6(object): channel = setup_params_general6['rf']['2G']['channel'] channel_width = setup_params_general6['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -415,14 +439,17 @@ setup_params_general7 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general7], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-7)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel7(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -432,7 +459,8 @@ class TestCountryUS40Mhz2GChannel7(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel7 - def test_client_bridge_wpa2_chn7_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 7") + def test_client_bridge_wpa2_chn7_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel7" """ @@ -446,10 +474,10 @@ class TestCountryUS40Mhz2GChannel7(object): channel = setup_params_general7['rf']['2G']['channel'] channel_width = setup_params_general7['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -478,14 +506,17 @@ setup_params_general8 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general8], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-8)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel8(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -495,7 +526,8 @@ class TestCountryUS40Mhz2GChannel8(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel8 - def test_client_bridge_wpa2_chn8_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 8") + def test_client_bridge_wpa2_chn8_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel8" """ @@ -509,10 +541,10 @@ class TestCountryUS40Mhz2GChannel8(object): channel = setup_params_general8['rf']['2G']['channel'] channel_width = setup_params_general8['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -541,14 +573,17 @@ setup_params_general9 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general9], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-9)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel9(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -558,7 +593,8 @@ class TestCountryUS40Mhz2GChannel9(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel9 - def test_client_bridge_wpa2_chn9_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 9") + def test_client_bridge_wpa2_chn9_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel9" """ @@ -572,10 +608,10 @@ class TestCountryUS40Mhz2GChannel9(object): channel = setup_params_general9['rf']['2G']['channel'] channel_width = setup_params_general9['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -604,14 +640,17 @@ setup_params_general10 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general10], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-10)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel10(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -621,7 +660,8 @@ class TestCountryUS40Mhz2GChannel10(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel10 - def test_client_bridge_wpa2_chn10_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 10") + def test_client_bridge_wpa2_chn10_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel10" """ @@ -635,10 +675,10 @@ class TestCountryUS40Mhz2GChannel10(object): channel = setup_params_general10['rf']['2G']['channel'] channel_width = setup_params_general10['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -667,14 +707,17 @@ setup_params_general11 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general11], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(40 MHz)") +@allure.sub_suite("US country code (Channel-11)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS40Mhz2GChannel11(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -684,7 +727,8 @@ class TestCountryUS40Mhz2GChannel11(object): @pytest.mark.fourtyMhz @pytest.mark.twog @pytest.mark.channel11 - def test_client_bridge_wpa2_chn11_40Mhz_US_2g(self, lf_test, station_names_twog, get_configuration): + @allure.title("Test for bandwidth 40 and channel 11") + def test_client_bridge_wpa2_chn11_40Mhz_US_2g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and fourtyMhz and wpa2 and twog and channel11" """ @@ -698,10 +742,10 @@ class TestCountryUS40Mhz2GChannel11(object): channel = setup_params_general11['rf']['2G']['channel'] channel_width = setup_params_general11['rf']['2G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_twog, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_80Mhz/fiveg_band/test_US_80Mhz_5g.py b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_80Mhz/fiveg_band/test_US_80Mhz_5g.py index a9b57f95c..244b62f06 100644 --- a/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_80Mhz/fiveg_band/test_US_80Mhz_5g.py +++ b/tests/e2e/basic/validation_of_operating_modes/country_code_channel_division/country_code_US/channel_width_80Mhz/fiveg_band/test_US_80Mhz_5g.py @@ -15,8 +15,7 @@ pytestmark = [pytest.mark.country_code, pytest.mark.bridge, pytest.mark.wpa2, py setup_params_general1 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -34,14 +33,17 @@ setup_params_general1 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-36)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS80Mhz5GChannel36(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -51,11 +53,12 @@ class TestCountryUS80Mhz5GChannel36(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel36 - def test_client_bridge_wpa2_chn36_80Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 36") + def test_client_bridge_wpa2_chn36_80Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel36" """ - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -65,10 +68,10 @@ class TestCountryUS80Mhz5GChannel36(object): channel = setup_params_general1['rf']['5G']['channel'] channel_width = setup_params_general1['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -78,8 +81,7 @@ class TestCountryUS80Mhz5GChannel36(object): setup_params_general2 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -98,14 +100,17 @@ setup_params_general2 = { } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-52)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS80Mhz5GChannel52(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -115,11 +120,12 @@ class TestCountryUS80Mhz5GChannel52(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel52 - def test_client_bridge_wpa2_chn52_80Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 52") + def test_client_bridge_wpa2_chn52_80Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel52" """ - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -129,10 +135,10 @@ class TestCountryUS80Mhz5GChannel52(object): channel = setup_params_general2['rf']['5G']['channel'] channel_width = setup_params_general2['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -142,8 +148,7 @@ class TestCountryUS80Mhz5GChannel52(object): setup_params_general3 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -161,14 +166,17 @@ setup_params_general3 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-100)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS80Mhz5GChannel100(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -178,11 +186,12 @@ class TestCountryUS80Mhz5GChannel100(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel100 - def test_client_bridge_wpa2_chn100_80Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 100") + def test_client_bridge_wpa2_chn100_80Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel100" """ - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" @@ -192,10 +201,10 @@ class TestCountryUS80Mhz5GChannel100(object): channel = setup_params_general3['rf']['5G']['channel'] channel_width = setup_params_general3['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: @@ -205,8 +214,73 @@ class TestCountryUS80Mhz5GChannel100(object): setup_params_general4 = { "mode": "BRIDGE", "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 80, + "channel": 116}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general4], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-116)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS80Mhz5GChannel116(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.fiveg + @pytest.mark.channel116 + @allure.title("Test for bandwidth 80 and channel 116") + def test_client_bridge_wpa2_chn116_80Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel116" + """ + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general4['rf']['5G']['channel'] + channel_width = setup_params_general4['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general5 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ]}, "rf": {"5G": {'band': '5G', @@ -224,14 +298,17 @@ setup_params_general4 = { "radius": False } -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], + 'setup_configuration', + [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-132)") +@pytest.mark.usefixtures("setup_configuration") class TestCountryUS80Mhz5GChannel132(object): """Country code along with Channel and Channel-width Test Bridge mode pytest -m "country_code and Bridge" @@ -241,24 +318,91 @@ class TestCountryUS80Mhz5GChannel132(object): @pytest.mark.eightyMhz @pytest.mark.fiveg @pytest.mark.channel132 - def test_client_bridge_wpa2_chn132_80Mhz_US_5g(self, lf_test, station_names_fiveg, get_configuration): + @allure.title("Test for bandwidth 80 and channel 132") + def test_client_bridge_wpa2_chn132_80Mhz_US_5g(self, get_test_library, setup_configuration): """Country code Bridge Mode pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel132" """ - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "BRIDGE" band = "fiveg" vlan = 1 - channel = setup_params_general4['rf']['5G']['channel'] - channel_width = setup_params_general4['rf']['5G']['channel-width'] + channel = setup_params_general5['rf']['5G']['channel'] + channel_width = setup_params_general5['rf']['5G']['channel-width'] - result = lf_test.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, mode=mode, - band=band, station_name=station_names_fiveg, vlan_id=vlan, - channel=channel,channel_width=channel_width,country_num=840, - country='United States(US)') + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) + if result: + assert True + else: + assert False + + +setup_params_general6 = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} + ]}, + "rf": {"5G": + {'band': '5G', + 'country': 'US', + 'channel-mode': 'VHT', + 'channel-width': 80, + "channel": 149}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general6], + indirect=True, + scope="class" +) +@allure.feature("Channel vs Country Code") +@allure.parent_suite("Country Code Tests") +@allure.suite("BRIDGE Mode(80 MHz)") +@allure.sub_suite("US country code (Channel-149)") +@pytest.mark.usefixtures("setup_configuration") +class TestCountryUS80Mhz5GChannel149(object): + """Country code along with Channel and Channel-width Test Bridge mode + pytest -m "country_code and Bridge" + """ + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2546", name="WIFI-6938") + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.fiveg + @pytest.mark.channel149 + @allure.title("Test for bandwidth 80 and channel 149") + def test_client_bridge_wpa2_chn149_80Mhz_US_5g(self, get_test_library, setup_configuration): + """Country code Bridge Mode + pytest -m "country_code and eightyMhz and wpa2 and fiveg and channel149" + """ + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + vlan = 1 + channel = setup_params_general6['rf']['5G']['channel'] + channel_width = setup_params_general6['rf']['5G']['channel-width'] + + result = get_test_library.country_code_channel_division(ssid=ssid, security=security, passkey=security_key, + band=band, vlan_id=vlan, channel=channel, mode=mode, + channel_width=channel_width,country_num=840, + country='United States(US)', dut_data=setup_configuration) if result: assert True else: diff --git a/tests/e2e/basic/validation_of_operating_modes/max_ssid/test_max_ssid.py b/tests/e2e/basic/validation_of_operating_modes/max_ssid/test_max_ssid.py index a3d6ed520..24c68e656 100644 --- a/tests/e2e/basic/validation_of_operating_modes/max_ssid/test_max_ssid.py +++ b/tests/e2e/basic/validation_of_operating_modes/max_ssid/test_max_ssid.py @@ -36,12 +36,12 @@ setup_params_general = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMaxEightSsid2G(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" @@ -112,12 +112,12 @@ setup_params_general1 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general1], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMaxEightSsid5G(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" @@ -189,12 +189,12 @@ setup_params_general2 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general2], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMoreThanEightSsid2G(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" @@ -275,12 +275,12 @@ setup_params_general3 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general3], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMoreThanEightSsid5G(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" @@ -366,12 +366,12 @@ setup_params_general4 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general4], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMaxSixteenSsid(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" @@ -458,12 +458,12 @@ setup_params_general5 = { @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general5], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestMoreThanSixteenSsid(object): """Config AP with maximum no.of SSIDs Test Bridge mode pytest -m "max_ssid and bridge" diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py index 83511a7fc..6124fa454 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py @@ -1,245 +1,277 @@ import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.uc_sanity] setup_params_enterprise = { "mode": "NAT", "ssid_modes": { "wpa_enterprise": [ - {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], "wpa2_enterprise": [ - {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}], "wpa3_enterprise": [ - {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": True } +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) @pytest.mark.uc_sanity -@pytest.mark.usefixtures("setup_profiles") -class TestNATModeEnterpriseTLSSuiteOne(object): +@pytest.mark.usefixtures("setup_configuration") +class TestNATModeEnterpriseTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and nat and enterprise and ttls" + """ @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_tls_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA-Enterprise-TTLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3747", name="WIFI-3747") + def test_tls_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 2G client connects to the AP in NAT mode with WPA enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_enterprise and ow_sanity_lf and ttls and nat and twog" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radcius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_tls_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA-Enterprise-TTLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3749", name="WIFI-3749") + def test_tls_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 5G client connects to the AP in NAT mode with WPA enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_enterprise and ow_sanity_lf and ttls and nat and fiveg" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] + pk_passwd = radius_info['pk_password'] # pk_passwd = radcius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) - - # if passes: - # update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"], - # status_id=1, - # msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str( - # passes)) - # else: - # update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"], - # status_id=5, - # msg='2G WPA Client Connectivity Failed - NAT mode' + str( - # passes)) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result - - @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_tls_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA2-Enterprise-TTLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3753", name="WIFI-3753") + def test_tls_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 2G client connects to the AP in NAT mode with WPA2 enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa2_enterprise and ow_sanity_lf and ttls and nat and twog" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa2" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] - # pk_passwd = radcius_info['pk_password'] + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_tls_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA2-Enterprise-TTLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3752", name="WIFI-3752") + def test_tls_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 5G client connects to the AP in NAT mode with WPA2 enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_enterprise and ow_sanity_lf and ttls and nat and fiveg" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa2" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP" identity = radius_info['user'] - # pk_passwd = radcius_info['pk_password'] + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) - - # if passes: - # update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"], - # status_id=1, - # msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str( - # passes)) - # else: - # update_report.update_testrail(case_id=test_cases["2g_wpa_NAT"], - # status_id=5, - # msg='2G WPA Client Connectivity Failed - NAT mode' + str( - # passes)) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result - - @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_tls_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA3-Enterprise-TTLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10585", name="WIFI-10585") + def test_tls_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 2G client connects to the AP in NAT mode with WPA3 enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa3_enterprise and ow_sanity_lf and ttls and nat and twog" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] - # pk_passwd = radcius_info['pk_password'] + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_twog, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_tls_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa3 enterprise 5g - pytest -m "client_connectivity and bridge and enterprise and tts and twog" - """ + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA3-Enterprise-TTLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10586", name="WIFI-10586") + def test_tls_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ + To verify that a 5G client connects to the AP in NAT mode with WPA3 enterprise TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa3_enterprise and ow_sanity_lf and ttls and nat and fiveg" + """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] - # pk_passwd = radcius_info['pk_password'] + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] # lf_tools.add_vlan(vlan) - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, - identity=identity, station_name=station_names_fiveg, - key_mgmt=key_mgmt, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result + setup_params_enterprise_two = { "mode": "NAT", "ssid_modes": { @@ -255,128 +287,156 @@ setup_params_enterprise_two = { } -@allure.suite(suite_name="sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-B") +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-B") @pytest.mark.suiteB @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestNATModeEnterpriseTLSSuiteTwo(object): """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteB" """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WAP-WPA2-Enterprise-Mixed-TTLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10587", name="WIFI-10587") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + To verify that a 2G client connects to the AP in NAT mode with WAP-WPA2 Enterprise-Mixed TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_wpa2_enterprise_mixed and ow_sanity_lf and ttls and nat and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result - + @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("Test for wpa wpa2 enterprise 5 GHz") + @allure.title("NAT Mode Client Connectivity Test with WAP-WPA2-Enterprise-Mixed-TTLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10588", name="WIFI-10588") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + To verify that a 5G client connects to the AP in NAT mode with WAP-WPA2 Enterprise-Mixed TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa_wpa2_enterprise_mixed and ow_sanity_lf and ttls and nat and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, setup_profiles, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and twog" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA3-Enterprise-Mixed-TTLS in 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3900", name="WIFI-3900") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + To verify that a 2G client connects to the AP in NAT mode with WPA3 Enterprise-Mixed TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa3_enterprise_mixed and ow_sanity_lf and ttls and nat and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, setup_profiles, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - """ wpa enterprise 2g - pytest -m "client_connectivity and bridge and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with WPA3-Enterprise-Mixed-TTLS in 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3901", name="WIFI-3901") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, execution_number, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): """ - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + To verify that a 5G client connects to the AP in NAT mode with WPA3 Enterprise-Mixed TTLS security will get the IP address under the specified subnet (192.168.1.1/16) + Unique Marker: pytest -m "client_connectivity_tests and enterprise and wpa3_enterprise_mixed and ow_sanity_lf and ttls and nat and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - - vlan = 1 tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, pk_passwd=pk_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result - - 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 2adc075ac..3f331a323 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 @@ -1,13 +1,14 @@ +""" + + Client Connectivity Enterprise TTLS + pytest -m "client_connectivity and nat and enterprise and ttls" + +""" import allure import pytest -pytestmark = [pytest.mark.ow_sanity_lf, - pytest.mark.ow_client_connectivity_lf, - pytest.mark.nat, - pytest.mark.enterprise, - pytest.mark.ttls, - pytest.mark.sanity, - pytest.mark.uc_sanity] +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.ttls, + pytest.mark.ucentral, pytest.mark.sanity, pytest.mark.uc_sanity, pytest.mark.ow_sanity_lf] setup_params_enterprise = { "mode": "NAT", @@ -26,156 +27,182 @@ setup_params_enterprise = { "radius": True } -@allure.feature("NAT MODE CLIENT CONNECTIVITY") + +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestNATModeEnterpriseTTLSSuiteOne(object): +@pytest.mark.usefixtures("setup_configuration") +class TestNATModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteA" + """ @pytest.mark.wpa_enterprise @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + @allure.title("Test for wpa enterprise 2.4 GHz") + def test_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + mode = "NAT-WAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + @allure.title("Test for wpa enterprise 5 GHz") + def test_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 5g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + mode = "NAT-WAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) - + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + @allure.title("Test for wpa2 enterprise 2.4 GHz") + def test_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa2" - mode = "NAT" + mode = "NAT-WAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) - + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result - @pytest.mark.sanity_light + @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + @allure.title("Test for wpa2 enterprise 5 GHz") + def test_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa2" - mode = "NAT" + mode = "NAT-WAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + @allure.title("Test for wpa3 enterprise 2.4 GHz") + def test_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + mode = "NAT-WAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, station_names_fiveg, get_ap_logs, get_lf_logs, - lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + @allure.title("Test for wpa3 enterprise 5 GHz") + def test_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + mode = "NAT-WAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @@ -195,107 +222,126 @@ setup_params_enterprise_two = { } -@pytest.mark.enterprise +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-B") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestNATModeEnterpriseTTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteB" + """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + @allure.title("Test for wpa wpa2 enterprise 2.4 GHz") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + mode = "NAT-WAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + @allure.title("Test for wpa wpa2 enterprise 5 GHz") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + mode = "NAT-WAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + @allure.title("Test for wpa3 enterprise mixed 2.4 GHz") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa3_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + mode = "NAT-WAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + @allure.title("Test for wpa3 enterprise mixed 5 GHz") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and nat and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]} ssid_name = profile_data["ssid_name"] security = "wpa3" - mode = "NAT" + mode = "NAT-WAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration) assert passes == "PASS", result 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 13a3c92c1..2cb933e1f 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 @@ -1,463 +1,469 @@ """ - Client Connectivity and tcp-udp Traffic Test: nat Mode - pytest -m "client_connectivity and nat and general" + Client Connectivity and tcp-udp Traffic Test: NAT Mode + pytest -m "client_connectivity_tests and nat and general" """ +import logging import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, pytest.mark.nat, pytest.mark.general, pytest.mark.sanity, - pytest.mark.uc_sanity, pytest.mark.ucentral] +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.nat, pytest.mark.general] setup_params_general = { "mode": "NAT", "ssid_modes": { "open": [{"ssid_name": "ssid_open_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], "wpa": [{"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g_nat", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g_nat", "appliedRadios": ["5G"], - "security_key": "something"}]}, + {"ssid_name": "ssid_wpa_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}]}, "rf": {}, "radius": False } - -@pytest.mark.suiteA -@pytest.mark.sanity_ucentral -@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestNATModeConnectivitySuiteA(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and nat and general and suiteA" +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectivitySuiteA(object): + """ + NAT Client Connectivity (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connectivity_tests and nat and general" """ @pytest.mark.open @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, - station_names_twog, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and nat and general and open and twog" + @allure.story('OPEN 2.4 GHZ Band') + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") + def test_nat_open_2g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - global setup_params_general - profile_data = setup_params_general["ssid_modes"]["open"][0] + NAT Mode Client Connectivity Test with open encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and open and twog" + """ + profile_data = {"ssid_name": "ssid_open_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] - print(ssid_name) security_key = "[BLANK]" security = "open" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.open @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_ap_logs, get_lf_logs, - lf_test, test_cases, station_names_fiveg, - update_report, get_ap_channel): - """Client Connectivity open ssid 5G - pytest -m "client_connectivity and NAT and general and open and fiveg" + @allure.story('OPEN 5 GHZ Band') + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") + def test_nat_open_5g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + NAT Mode Client Connectivity Test with open encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and open and fiveg" + """ + profile_data = {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = "[BLANK]" security = "open" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light + @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_ap_logs, update_report, get_lf_logs, - lf_test, test_cases, station_names_twog, get_ap_channel): - """Client Connectivity wpa ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa and twog" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") + def test_nat_wpa_2g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + NAT Mode Client Connectivity Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg + @pytest.mark.parametrize('execution_number', range(2)) @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, test_cases, station_names_fiveg, get_ap_channel): - """Client Connectivity wpa ssid 5G - pytest -m "client_connectivity and NAT and general and wpa and fiveg" + @allure.title("NAT Mode Client Connectivity Test with wpa encryption 5 GHz Band") + def test_nat_wpa_5g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + NAT Mode Client Connectivity Test with wpa encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) - + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog + @pytest.mark.parametrize('execution_number', range(2)) @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, test_cases, - station_names_twog, get_ap_channel): - """Client Connectivity wpa2_personal ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa2_personal and twog" + @allure.title("NAT Mode Client Connectivity Test with wpa2_personal encryption 2.4 GHz Band") + def test_nat_wpa2_personal_2g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + NAT Mode Client Connectivity Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result - @pytest.mark.sanity_light + # + @pytest.mark.wpa2_personal @pytest.mark.fiveg + @pytest.mark.parametrize('execution_number', range(2)) @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, - update_report, test_cases, - station_names_fiveg, - lf_test, get_ap_channel): - """Client Connectivity wpa2_personal ssid 5G - pytest -m "client_connectivity and NAT and general and wpa2_personal and fiveg" + @allure.title("NAT Mode Client Connectivity Test with wpa2_personal encryption 5 GHz Band") + def test_nat_wpa2_personal_5g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + NAT Mode Client Connectivity Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result -setup_params_general_two = { +setup_params_general_two_nat = { "mode": "NAT", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_wpa3_p_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_6g_nat", "appliedRadios": ["6G"], "security_key": "something"}], "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], + {"ssid_name": "ssid_wpa3_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}] }, "rf": {}, "radius": False } -@pytest.mark.suiteB -@allure.feature("NAT MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], + 'setup_configuration', + [setup_params_general_two_nat], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestNATModeConnectivitySuiteB(object): +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectivitySuiteTwo(object): """ Client Connectivity SuiteA - pytest -m "client_connectivity and NAT and suiteB" + pytest -m "client_connectivity_tests and nat and suiteB" """ @pytest.mark.wpa3_personal @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa3_personal and twog" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("NAT Mode Client Connectivity Test with wpa3_personal encryption 2.4 GHz Band") + def test_nat_wpa3_personal_2g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + NAT Mode Client Connectivity Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.wpa3_personal @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa3_personal and fiveg" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("NAT Mode Client Connectivity Test with wpa3_personal encryption 5 GHz Band") + def test_nat_wpa3_personal_5g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + NAT Mode Client Connectivity Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @allure.story('wpa3_personal 6 GHZ Band') + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa3_personal encryption 5 GHz Band") + def test_nat_wpa3_personal_6g_client_connectivity(self, get_test_library, execution_number, num_stations, + get_dut_logs_per_test_case, get_test_device_logs, + check_connectivity, setup_configuration): + """ + NAT Mode Client Connectivity Test with wpa3_personal encryption 6 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_6g_nat", "appliedRadios": ["6G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" + band = "sixg" + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, - station_names_twog, - lf_test, get_lf_logs, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa3_personal_mixed and twog" + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa3_personal_mixed encryption 2.4 GHz Band") + def test_nat_wpa3_personal_mixed_2g_client_connectivity(self, get_test_library, execution_number, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + NAT Mode Client Connectivity Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa3_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa3_personal_mixed and fiveg" + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa3_personal_mixed encryption 5 GHz Band") + def test_nat_wpa3_personal_mixed_5g_client_connectivity(self, get_test_library, execution_number, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + NAT Mode Client Connectivity Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa3_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @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_ap_logs, get_lf_logs, - station_names_twog, - lf_test, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and twog" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + def test_nat_wpa_wpa2_personal_mixed_2g_client_connectivity(self, get_test_library, execution_number, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + NAT Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) assert passes == "PASS", result @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_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and fiveg" + @pytest.mark.parametrize('execution_number', range(2)) + @allure.title("NAT Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + def test_nat_wpa_wpa2_personal_mixed_5g_client_connectivity(self, get_test_library, execution_number, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + NAT Mode Client Connectivity Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] - mode = "NAT" + if execution_number == 0: + mode = "NAT-WAN" + if execution_number == 1: + mode = "NAT-LAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 1 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations) + assert passes == "PASS", result - - -# WEP Security Feature not available -# setup_params_wep = { -# "mode": "NAT", -# "ssid_modes": { -# "wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["2G"], "default_key_id": 1, -# "wep_key": 1234567890}, -# {"ssid_name": "ssid_wep_5g", "appliedRadios": ["5G"], -# "default_key_id": 1, "wep_key": 1234567890}] -# }, -# "rf": {}, -# "radius": True -# } -# -# -# @pytest.mark.enterprise -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_wep], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# class TestNATModeWEP(object): -# -# @pytest.mark.wep -# @pytest.mark.twog -# def test_wep_2g(self, get_vif_state,station_names_twog, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][0] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "NAT" -# band = "twog" -# vlan = 1 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_twog, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - NAT mode' + str( -# passes)) -# assert passes -# -# @pytest.mark.wep -# @pytest.mark.fiveg -# def test_wep_5g(self, get_vif_state,station_names_fiveg, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][1] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "NAT" -# band = "twog" -# vlan = 1 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_fiveg, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - NAT mode' + str( -# passes)) -# assert passes diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multi_psk_nat_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multi_psk_nat_wpa2.py deleted file mode 100644 index f83472cda..000000000 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multi_psk_nat_wpa2.py +++ /dev/null @@ -1,131 +0,0 @@ -""" - - Performance Test: Multi-psk Test: NAT Mode - pytest -m "multipsk and wpa2_personal and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports - wifi-3495 -""" -import time -import allure -import pytest - -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_sanity_lf, - pytest.mark.ow_multipsk_tests_lf, - pytest.mark.nat] - - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "MDU Wi-Fi", - "appliedRadios": ["2G"], - "security": "psk2", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 200 - }, - { - "key": "lanforge3" - } - ], - }, - ]}, - "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 TestMultipskNAT(object): - - @pytest.mark.multipsk - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.twogvlan1 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3495", name="WIFI-3495") - def test_client_wpa2_2g_vlan1(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - lf_tools.reset_scenario() - print(profile_data) - ssid_name = profile_data["ssid_name"] - print(ssid_name) - security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - security = "wpa2" - mode = "NAT" - band = "twog" - vlan = 1 - # create vlan - lf_tools.add_vlan(vlan_ids=[int(vlan_id[0])]) - time.sleep(10) - station_name = [] - station_name.append("sta" + str(vlan_id[0])) - station_name.append("sta00") - print(station_name) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa2", mode="NAT", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, station_name=station_name, n_vlan="1") - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" - - @pytest.mark.multipsk - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.twogvlan2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3495", name="WIFI-3495") - def test_client_wpa2_2g_vlan2(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - lf_tools.reset_scenario() - ssid_name = profile_data["ssid_name"] - print(ssid_name) - security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - vlan_id.append(profile_data["multi-psk"][1]['vlan-id']) - - security = "wpa2" - mode = "NAT" - band = "twog" - vlan = 1 - # create vlan - station_name = [] - for i in vlan_id: - lf_tools.add_vlan(vlan_ids=[int(i)]) - station_name.append("sta" + str(i)) - time.sleep(10) - - - station_name.append("sta00") - print(station_name) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa2", mode="NAT", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, - station_name=station_name, n_vlan="2", key3=key3) - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" - - diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py new file mode 100644 index 000000000..8b95e208a --- /dev/null +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py @@ -0,0 +1,127 @@ +""" + + Performance Test: Multi-psk Test: NAT-WAN Mode + pytest -m "multipsk and wpa2_personal and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports + wifi-3493 +""" +import allure +import pytest + +pytestmark = [pytest.mark.multi_psk_tests, + pytest.mark.nat, + pytest.mark.wpa2_personal, + pytest.mark.ow_sanity_lf, + pytest.mark.twog] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + }]}, + "rf": {}, + "radius": False +} + + +@allure.feature("MultiPsk Test") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@allure.parent_suite("MultiPsk Test") +@allure.suite("NAT Mode") +@allure.sub_suite("WPA2 Security") +@pytest.mark.usefixtures("setup_configuration") +class TestMultipskNAT(object): + + @pytest.mark.vlan1 + @pytest.mark.ow_sanity_lf + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3495", name="WIFI-3495") + @allure.title("Test for Client Connect with 1 VLAN") + def test_client_wpa2_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify a client operating on NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not. + Unique Marker:pytest -m "multi_psk_tests and NAT and wpa_personal and vlan1 and twog" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT-WAN" + band = "twog" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}} + + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True + + @pytest.mark.vlan2 + @pytest.mark.ow_sanity_lf + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10061", name="WIFI-10061") + @allure.title("Test for Client Connect with 2 VLAN's") + def test_client_wpa2_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify the client operating on NAT Mode Multipsk Test with WPA encryption 2.4 GHz Band + Unique marker: pytest -m "multi_psk_tests and nat and wpa2_personal and vlan2 and twog" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT-WAN" + band = "twog" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}, + 200: {"num_stations": 1, "passkey": profile_data["multi-psk"][1]["key"]}} + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True \ No newline at end of file diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multi_psk_nat_wpa.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multi_psk_nat_wpa.py deleted file mode 100644 index e76638299..000000000 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multi_psk_nat_wpa.py +++ /dev/null @@ -1,128 +0,0 @@ -""" - - Performance Test: Multi-psk Test: NAT Mode - pytest -m "multipsk and wpa and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports - wifi-3494 -""" -import os -import time - -import pytest -import allure - -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_sanity_lf, - pytest.mark.ow_multipsk_tests_lf, - pytest.mark.nat] - - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa": [ - {"ssid_name": "MDU Wi-Fi", - "appliedRadios": ["2G"], - "security": "psk", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 200 - }, - { - "key": "lanforge3" - } - ], - }]}, - "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 TestMultipskNAT(object): - - @pytest.mark.multipsk - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.twogvlan1 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3494", name="WIFI-3494") - def test_client_wpa_2g_vlan1(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - lf_tools.reset_scenario() - ssid_name = profile_data["ssid_name"] - print(ssid_name) - security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - security = "wpa" - mode = "NAT" - band = "twog" - # create vlan - lf_tools.add_vlan(vlan_ids=[int(vlan_id[0])]) - time.sleep(10) - station_name = [] - station_name.append("sta" + str(vlan_id[0])) - station_name.append("sta00") - print(station_name) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa", mode="NAT", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, station_name=station_name, n_vlan="1") - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" - - @pytest.mark.multipsk - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.twogvlan2 - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3494", name="WIFI-3494") - def test_client_wpa_2g_vlan2(self, lf_test, lf_tools): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - lf_tools.reset_scenario() - ssid_name = profile_data["ssid_name"] - print(ssid_name) - security_key = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - vlan_id = [] - vlan_id.append(profile_data["multi-psk"][0]['vlan-id']) - vlan_id.append(profile_data["multi-psk"][1]['vlan-id']) - - security = "wpa" - mode = "NAT" - band = "twog" - # create vlan - station_name = [] - for i in vlan_id: - lf_tools.add_vlan(vlan_ids=[int(i)]) - station_name.append("sta" + str(i)) - time.sleep(10) - - - station_name.append("sta00") - print(station_name) - multipsk_obj = lf_test.multipsk(ssid=ssid_name, security="wpa", mode="NAT", - vlan_id=vlan_id, key1=key1, key2=key2, band=band, - station_name=station_name, n_vlan="2", key3=key3) - if multipsk_obj == True: - assert True - else: - assert False, "Expected and Attained IP's of Station are Different" - diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py new file mode 100644 index 000000000..d383e0a1d --- /dev/null +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/multi_psk/wpa_security/test_multipsk_basic_wpa.py @@ -0,0 +1,127 @@ +""" + + Performance Test: Multi-psk Test: nat Mode + pytest -m "multipsk and wpa_personal and twog" -s -vvv --skip-testrail --testbed=basic-03 --alluredir=../allure_reports + wifi-3493 +""" +import allure +import pytest + +pytestmark = [pytest.mark.multi_psk_tests, + pytest.mark.nat, + pytest.mark.wpa, + pytest.mark.ow_sanity_lf, + pytest.mark.twog] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "wpa": [ + {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + }]}, + "rf": {}, + "radius": False +} + + +@allure.feature("MultiPsk Test") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@allure.parent_suite("MultiPsk Test") +@allure.suite("NAT Mode") +@allure.sub_suite("WPA Security") +@pytest.mark.usefixtures("setup_configuration") +class TestMultipskNAT(object): + + @pytest.mark.vlan1 + @pytest.mark.ow_sanity_lf + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3494", name="WIFI-3494") + @allure.title("Test for Client Connect with 1 VLAN") + def test_client_wpa_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify the client operating on NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not. + pytest -m "multi_psk_tests and NAT and wpa_personal and vlan1 and twog" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT-WAN" + band = "twog" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}} + + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True + + @pytest.mark.vlan2 + @pytest.mark.ow_sanity_lf + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10662", name="WIFI-10662") + @allure.title("Test for Client Connect with 2 VLAN's") + def test_client_wpa_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify a client operating on NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band is connecting or not. + pytest -m "multi_psk_tests and NAT and wpa and vlan2 and twog" + """ + profile_data = {"ssid_name": "MDU-Wi-Fi-2g", + "appliedRadios": ["2G"], + "security": "psk2", + "security_key": "OpenWifi", + "multi-psk": [ + { + "key": "OpenWifi1", + "vlan-id": 100 + }, + { + "key": "OpenWifi2", + "vlan-id": 200 + } + ], + } + ssid = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT-WAN" + band = "twog" + mpsk_data = {"default": {"num_stations": 1, "passkey": profile_data["security_key"]}, + 100: {"num_stations": 1, "passkey": profile_data["multi-psk"][0]["key"]}, + 200: {"num_stations": 1, "passkey": profile_data["multi-psk"][1]["key"]}} + get_test_library.multi_psk_test(band=band, mpsk_data=mpsk_data, ssid=ssid, bssid="['BLANK']", + passkey=security_key, + encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration) + assert True \ No newline at end of file diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py index 77f709a3c..3b3082417 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py @@ -1,13 +1,11 @@ """ -Rate LImiting Nat Mode Scenario +Rate LImiting NAT Mode Scenario """ import allure import pytest - -pytestmark = [pytest.mark.ow_regression_lf, pytest.mark.nat] - +pytestmark = [pytest.mark.nat, pytest.mark.rate_limiting_tests] setup_params_general = { "mode": "NAT", @@ -17,16 +15,16 @@ setup_params_general = { "appliedRadios": ["2G"], "security_key": "something", "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }, {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something", "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }]}, "rf": {}, @@ -34,594 +32,729 @@ setup_params_general = { } -@allure.feature("Nat Mode Rate Limiting") +@allure.feature("Rate Limiting Test") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite("NAT Mode") +@allure.sub_suite("WPA2 Personal Security") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingNat(object): +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingNAT(object): @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up and batch_size_125" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and upload and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and dw and batch_size_125" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_dw", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up_dw - @pytest.mark.batch_size_125 + @pytest.mark.upload_download @pytest.mark.ow_sanity_lf - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.batch_size_125 + @pytest.mark.rate_limiting_tests + @allure.testcase(name="WIFI-5849", + url="https://telecominfraproject.atlassian.net/browse/WIFI-5849") + @allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + check_connectivity): """ - Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up_dw and batch_size_125" + To verfiy a client operating with WPA2 Personal security can limit the UP & DW traffic or not. + Unique marker:pytest -m "rate_limiting_tests and wpa2_personal and nat and ow_sanity_lf and twog and upload_download and batch_size_125" + """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.disable_up_dw - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_nat_ssid_disable_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and disable_up_dw" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and disable_up_dw" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_di", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw_di", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_nat_ssid_up_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload and Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up_dw_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and up_dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_nat_ssid_up_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and up_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_per_cl", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_per_cl", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_nat_ssid_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and dw_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up and batch_size_125" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and upload and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_125", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_125", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and dw and batch_size_125" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up_dw and batch_size_125" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and upload_download and batch_size_125" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and upload and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_1", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_1", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and dw and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_tcp_dl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and twog and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and upload_download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_1", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_tcp_dl_up_dw_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and upload and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_1_5g", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and dw and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_nat_ssid_up_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and upload_download and batch_size_1" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.disable_up_dw - def test_wpa2_personal_nat_ssid_disable_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and disable_up_dw" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and disable_up_dw" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_di", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_dw_di_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_dw_per_client - def test_wpa2_personal_nat_ssid_up_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up_dw_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and up_dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_dw_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_per_client - def test_wpa2_personal_nat_ssid_up_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and up_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and up_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_up_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_up_per_cl_5g", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dw_per_client - def test_wpa2_personal_nat_ssid_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and nat and wpa2_personal and fiveg and dw_per_client" + pytest -m "rate_limiting_tests and nat and wpa2_personal and fiveg and dw_per_client" """ # run wifi capacity test here - lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] - mode = "NAT" - vlan = 1 + mode = "NAT-WAN" + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_nat_dw_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_NAT_dw_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_tls.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_tls.py index 9100d7213..b0308385a 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_tls.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_tls.py @@ -1,7 +1,7 @@ import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.tls, pytest.mark.uc_sanity] setup_params_enterprise = { @@ -23,164 +23,232 @@ setup_params_enterprise = { } +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) @pytest.mark.uc_sanity -@pytest.mark.usefixtures("setup_profiles") -class TestVLANModeEnterpriseTLSSuiteOne(object): +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeEnterpriseTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and vlan and enterprise and tls" + """ @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + @allure.title("Test for wpa enterprise 2.4 GHz") + def test_tls_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and tts and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radcius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + @allure.title("Test for wpa enterprise 5 GHz") + def test_tls_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and tts and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radcius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result - # @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + @allure.title("Test for wpa2 enterprise 2.4 GHz") + def test_tls_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and tls and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result - # @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + @allure.title("Test for wpa2 enterprise 5 GHz") + def test_tls_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and tts and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + @allure.title("Test for wpa3 enterprise 2.4 GHz") + def test_tls_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and tts and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + @allure.title("Test for wpa3 enterprise 5 GHz") + def test_tls_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 5g + pytest -m "client_connectivity_tests and vlan and enterprise and tts and twog" + """ + + profile_data = {"ssid_name": "tls_ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" + key_mgmt = "WPA-EAP-SHA256" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + # pk_passwd = radius_info['pk_password'] + # lf_tools.add_vlan(vlan) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + key_mgmt=key_mgmt, pk_passwd=pk_passwd, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result + setup_params_enterprise_two = { "mode": "VLAN", "ssid_modes": { @@ -196,115 +264,139 @@ setup_params_enterprise_two = { } -@pytest.mark.enterprise +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="EAP TLS Client Connectivity : Suite-B") +@pytest.mark.suiteB @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestVLANModeEnterpriseTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and suiteB" + """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - @pytest.mark.amrit - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + @allure.title("Test for wpa wpa2 enterprise 2.4 GHz") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - @pytest.mark.amrit - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, - station_names_fiveg, - lf_test, get_lf_logs, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + @allure.title("Test for wpa wpa2 enterprise 5 GHz") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - @pytest.mark.amrit - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, - lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + @allure.title("Test for wpa3 enterprise mixed 2.4 GHz") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "twog" - vlan = 100 - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - @pytest.mark.amrit - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, - lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + @allure.title("Test for wpa3 enterprise mixed 5 GHz") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "tls_ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=tls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + pk_passwd = radius_info['pk_password'] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=tls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, pk_passwd=pk_passwd, + dut_data=setup_configuration) assert passes == "PASS", result 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 a733c151f..400464eff 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 @@ -1,8 +1,14 @@ +""" + + Client Connectivity Enterprise TTLS + pytest -m "client_connectivity and vlan and enterprise and ttls" + +""" import allure import pytest -pytestmark = [pytest.mark.ow_client_connectivity_lf, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.ttls, - pytest.mark.ucentral, pytest.mark.sanity] # pytest.mark.usefixtures("setup_test_run") +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.ttls, + pytest.mark.ucentral, pytest.mark.sanity, pytest.mark.uc_sanity] setup_params_enterprise = { "mode": "VLAN", @@ -22,161 +28,193 @@ setup_params_enterprise = { } +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-A") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise], indirect=True, scope="class" ) -@pytest.mark.uc_sanity -@pytest.mark.usefixtures("setup_profiles") -class TestVLANModeEnterpriseTTLSSuiteOne(object): +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and suiteA" + """ @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + @allure.title("Test for wpa enterprise 2.4 GHz") + def test_wpa_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_conclient_connectivity_testsnectivity and vlan and enterprise and ttls and wpa_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + @allure.title("Test for wpa enterprise 5 GHz") + def test_wpa_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 5g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) - + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + @allure.title("Test for wpa2 enterprise 2.4 GHz") + def test_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa2_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) - + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.sanity_light @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + @allure.title("Test for wpa2 enterprise 5 GHz") + def test_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa2_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa2" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + @allure.title("Test for wpa3 enterprise 2.4 GHz") + def test_wpa3_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + @allure.title("Test for wpa3 enterprise 5 GHz") + def test_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration, + key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result @@ -196,112 +234,134 @@ setup_params_enterprise_two = { } -@pytest.mark.enterprise +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="EAP TTLS Client Connectivity : Suite-B") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_enterprise_two], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestVLANModeEnterpriseTTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and suiteB" + """ @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - @pytest.mark.shivamt - def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + @allure.title("Test for wpa wpa2 enterprise 2.4 GHz") + def test_wpa_wpa2_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa_wpa2_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, - station_names_fiveg, - lf_test, get_lf_logs, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + @allure.title("Test for wpa wpa2 enterprise 5 GHz") + def test_wpa_wpa2_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connclient_connectivity_testsectivity and vlan and enterprise and ttls and wpa_wpa2_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, - lf_test, - update_report, test_cases, radius_info, exit_on_fail, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] + @allure.title("Test for wpa3 enterprise mixed 2.4 GHz") + def test_wpa3_enterprise_mixed_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, - lf_test, - update_report, exit_on_fail, - test_cases, radius_info, get_ap_channel): - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] + @allure.title("Test for wpa3 enterprise mixed 5 GHz") + def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, + get_target_object, + num_stations, setup_configuration, check_connectivity, radius_info): + """ wpa enterprise 2g + pytest -m "client_connectivity_tests and vlan and enterprise and ttls and wpa3_enterprise_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100} ssid_name = profile_data["ssid_name"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 + vlan = [100] ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - passes, result = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, - eap=eap, ttls_passwd=ttls_passwd, identity=identity, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + vlan_id=vlan, + dut_data=setup_configuration) assert passes == "PASS", result 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 4117c5c91..1fc7892f4 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 @@ -1,18 +1,15 @@ """ - Client Connectivity and tcp-udp Traffic Test: vlan Mode - pytest -m "client_connectivity and vlan and general" + Client Connectivity and tcp-udp Traffic Test: VLAN Mode + pytest -m "client_connectivity_tests and vlan and general" """ +import logging import allure import pytest -pytestmark = [pytest.mark.ow_sanity_lf, - pytest.mark.ow_client_connectivity_lf, - pytest.mark.vlan, - pytest.mark.general, - pytest.mark.sanity] +pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.vlan, pytest.mark.general, pytest.mark.ow_sanity_lf] setup_params_general = { "mode": "VLAN", @@ -20,446 +17,431 @@ setup_params_general = { "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], + {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa2_personal": [ {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, + {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, "rf": {}, "radius": False } -@pytest.mark.uc_sanity -@pytest.mark.suiteA -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestvlanModeConnectivitySuiteA(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and vlan and general and suiteA" +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeConnectivitySuiteA(object): + """ + VLAN Client Connectivity (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connectivity and vlan and general " """ @pytest.mark.open @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, - station_names_twog, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and open and twog" + @allure.story('OPEN 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with Open Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10608", name="WIFI-10608") + def test_vlan_open_2g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["open"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode (i.e VLAN-100) with open authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and open and twog" + """ + profile_data = {"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = "[BLANK]" security = "open" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + assert passes == "PASS", result @pytest.mark.open @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_ap_logs, get_lf_logs, - lf_test, test_cases, station_names_fiveg, - update_report, get_ap_channel): - """Client Connectivity open ssid 5G - pytest -m "client_connectivity and vlan and general and open and fiveg" + @allure.story('OPEN 5 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with Open Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10622", name="WIFI-10622") + def test_vlan_open_5g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["open"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (VLAM-100) with open authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and open and fiveg" + """ + profile_data = {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = "[BLANK]" security = "open" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - @pytest.mark.sanity_light + # + @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_ap_logs, - update_report, get_lf_logs, - lf_test, test_cases, station_names_twog, get_ap_channel): - """Client Connectivity wpa ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa and twog" + @allure.title("VLAN Mode Client Connectivity Test with WPA Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2125", name="WIFI-2125") + def test_vlan_wpa_2g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, test_cases, station_names_fiveg, get_ap_channel): - """Client Connectivity wpa ssid 5G - pytest -m "client_connectivity and vlan and general and wpa and fiveg" + @allure.title("VLAN Mode Client Connectivity Test with WPA Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2134", name="WIFI-2134") + def test_vlan_wpa_5g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - @pytest.mark.sanity_light @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, - lf_test, update_report, test_cases, - station_names_twog, get_ap_channel): - """Client Connectivity wpa2_personal ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa2_personal and twog" + @allure.title("VLAN Mode Client Connectivity Test with WPA2-Personal Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2124", name="WIFI-2124") + def test_vlan_wpa2_personal_2g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode with WPA2-Personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - @pytest.mark.sanity_light + # + @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, - update_report, test_cases, - station_names_fiveg, - lf_test, get_ap_channel): - """Client Connectivity wpa2_personal ssid 5G - pytest -m "client_connectivity and vlan and general and wpa2_personal and fiveg" + @allure.title("VLAN Mode Client Connectivity Test with WPA2-Personal Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2140", name="WIFI-2140") + def test_vlan_wpa2_personal_5g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA2-Personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa2" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result -setup_params_general_two = { +setup_params_general_two_vlan = { "mode": "VLAN", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], + {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_6g_vlan", "appliedRadios": ["6G"], "security_key": "something", "vlan": 100}], "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], + {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100}] }, "rf": {}, "radius": False } -@pytest.mark.suiteB -@allure.feature("vlan MODE CLIENT CONNECTIVITY") +@allure.feature("Client Connectivity") +@allure.parent_suite("Client Connectivity Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connectivity") @pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], + 'setup_configuration', + [setup_params_general_two_vlan], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestvlanModeConnectivitySuiteTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and vlan and suiteB" +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeConnectivitySuiteTwo(object): + """" + VLAN Client Connectivity (wpa3_personal. wpa3_personal_mixed. wpa_wpa2_personal_mixed) (twog, fiveg) + sixg is also available in wpa3_personal band + pytest -m "client_connectivity_tests and vlan and general" """ - @pytest.mark.uc_sanity @pytest.mark.wpa3_personal @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_ap_logs, get_lf_logs, - station_names_twog, lf_test, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa3_personal and twog" + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with WPA3-Personal Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10627", name="WIFI-10627") + def test_vlan_wpa3_personal_2g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA3-Personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa3_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - @pytest.mark.uc_sanity @pytest.mark.wpa3_personal @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa3_personal and fiveg" + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with WPA3-Personal Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10629", name="WIFI-10629") + def test_vlan_wpa3_personal_5g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA3-Personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa3_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.sixg + @allure.story('wpa3_personal 6 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with WPA3-Personal Encryption 6GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10764", name="WIFI-10764") + def test_vlan_wpa3_personal_6g_client_connectivity(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): + """ + To verify that a client created on 6G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA3-Personal authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa3_personal and sixg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_6g_vlan", "appliedRadios": ["6G"], "security_key": "something", + "vlan": 100} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + band = "sixg" + mode = "VLAN" + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + assert passes == "PASS", result - @pytest.mark.uc_sanity @pytest.mark.wpa3_personal_mixed @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, - station_names_twog, - lf_test, get_lf_logs, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa3_personal_mixed and twog" + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with WPA3-Personal-Mixed Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10630", name="WIFI-10630") + def test_vlan_wpa3_personal_mixed_2g_client_connectivity(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA3-Personal-Mixed authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa3_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + assert passes == "PASS", result - @pytest.mark.uc_sanity @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, - station_names_fiveg, lf_test, - test_cases, get_lf_logs, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa3_personal_mixed and fiveg" + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("VLAN Mode Client Connectivity Test with WPA3-Personal-Mixed Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10631", name="WIFI-10631") + def test_vlan_wpa3_personal_mixed_5g_client_connectivity(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA3-Personal-Mixed authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa3_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa3" mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + assert passes == "PASS", result - @pytest.mark.uc_sanity @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_ap_logs, - station_names_twog, - lf_test, get_lf_logs, - update_report, - test_cases, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa_wpa2_personal_mixed and twog" + @allure.title("VLAN Mode Client Connectivity Test with WPA-WPA2-Personal-Mixed Encryption 2.4GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10632", name="WIFI-10632") + def test_vlan_wpa_wpa2_personal_mixed_2g_client_connectivity(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + To verify that a client created on 2G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA-WPA2-Personal-Mixed authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "twog" - channel = get_ap_channel[0]["2G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + assert passes == "PASS", result - @pytest.mark.uc_sanity @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_ap_logs, get_lf_logs, - station_names_fiveg, lf_test, test_cases, - update_report, get_ap_channel): - """Client Connectivity open ssid 2.4G - pytest -m "client_connectivity and vlan and general and wpa_wpa2_personal_mixed and fiveg" + @allure.title("VLAN Mode Client Connectivity Test with WPA-WPA2-Personal-Mixed Encryption 5GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-10633", name="WIFI-10633") + def test_vlan_wpa_wpa2_personal_mixed_5g_client_connectivity(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + check_connectivity, setup_configuration): """ - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + To verify that a client created on 5G radio connects to AP in VLAN mode (i.e VLAN-100) with WPA-WPA2-Personal-Mixed authentication + Unique Marker: pytest -m "client_connectivity_tests and vlan and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100} ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] security = "wpa" extra_secu = ["wpa2"] mode = "VLAN" band = "fiveg" - channel = get_ap_channel[0]["5G"] - print("ssid channel:- ", channel) - vlan = 100 - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan, ssid_channel=channel) + vlan = [100] + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) assert passes == "PASS", result - -# WEP Security Feature not available -# setup_params_wep = { -# "mode": "VLAN", -# "ssid_modes": { -# "wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["2G"], "default_key_id": 1, -# "wep_key": 1234567890}, -# {"ssid_name": "ssid_wep_5g", "appliedRadios": ["5G"], -# "default_key_id": 1, "wep_key": 1234567890}] -# }, -# "rf": {}, -# "radius": True -# } -# -# -# @pytest.mark.enterprise -# @pytest.mark.parametrize( -# 'setup_profiles', -# [setup_params_wep], -# indirect=True, -# scope="class" -# ) -# @pytest.mark.usefixtures("setup_profiles") -# class TestvlanModeWEP(object): -# -# @pytest.mark.wep -# @pytest.mark.twog -# def test_wep_2g(self, get_vif_state,station_names_twog, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][0] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "VLAN" -# band = "twog" -# vlan = 100 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_twog, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_vlan"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - vlan mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_vlan"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - vlan mode' + str( -# passes)) -# assert passes -# -# @pytest.mark.wep -# @pytest.mark.fiveg -# def test_wep_5g(self, get_vif_state,station_names_fiveg, setup_profiles, lf_test, update_report, -# test_cases, radius_info): -# profile_data = setup_params_wep["ssid_modes"]["wep"][1] -# ssid_name = profile_data["ssid_name"] -# wep_key = "[BLANK]" -# security = "open" -# extra_secu = [] -# mode = "VLAN" -# band = "twog" -# vlan = 100 -# passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, -# passkey=wep_key, mode=mode, band=band, -# station_name=station_names_fiveg, vlan_id=vlan) -# -# if passes: -# update_report.update_testrail(case_id=test_cases["2g_wpa_vlan"], -# status_id=1, -# msg='2G WPA Client Connectivity Passed successfully - vlan mode' + str( -# passes)) -# else: -# update_report.update_testrail(case_id=test_cases["2g_wpa_vlan"], -# status_id=5, -# msg='2G WPA Client Connectivity Failed - vlan mode' + str( -# passes)) -# assert passes diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa2.py index 980b239e0..bb41e96c8 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa2.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa2.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa2_enterprise and vlan" """ -import os import allure import pytest -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_sanity_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa2_enterprise, - pytest.mark.fiveg] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan, + pytest.mark.ow_sanity_lf] setup_params_general = { "mode": "VLAN", @@ -32,15 +33,18 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan") +# @allure.suite("regression") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA2 Enterprise Security") +@allure.sub_suite("5 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlanOverSsid5GWpa2(object): @pytest.mark.dynamic_precedence_over_ssid @@ -48,67 +52,54 @@ class TestDynamicVlanOverSsid5GWpa2(object): @pytest.mark.fiveg @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5705") - def test_dynamic_precedence_over_ssid_vlan_5g_wpa2(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("Test for dynamic precedence over ssid") + def test_dynamic_precedence_over_ssid_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan" + pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] mode = "VLAN" + band = "fiveg" vlan = [100,200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[0], - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) - - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}" + f"\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per dynamic vlan") + assert True, result elif not val: - print("Station ip not assigned as per dynamic vlan") - assert False \ No newline at end of file + assert False, result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa2.py index 94d8afc68..7c60e4903 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa2.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa2.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa2_enterprise and vlan" """ -import os import allure import pytest import time -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa2_enterprise, - pytest.mark.fiveg] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -32,15 +33,17 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA2 Enterprise Security") +@allure.sub_suite("5 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlan5GWpa2(object): @pytest.mark.absence_of_radius_vlan_identifier @@ -49,603 +52,438 @@ class TestDynamicVlan5GWpa2(object): @pytest.mark.ow_sanity_lf @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", url="https://telecominfraproject.atlassian.net/browse/WIFI-5704") - def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("Test for ssid vlan in the absence of radius vlan identifier") + def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan" + pytest -m "absence_of_radius_vlan_identifier and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan_id = 100 + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] - - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') - print(sta_ip_1) + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - # eth_ip_1 = eth_ip.split('.') + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("upstream ip...", eth_ip) - print("ssid configured vlan ip", eth_vlan_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False elif i == j: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.invalidradiusvlan @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_dynamic_invalid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5706") - def test_dynamic_invalid_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("Test for invalid vlan identifier") + def test_dynamic_invalid_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "invalidradiusvlan and wpa2_enterprise and vlan" + pytest -m "invalidradiusvlan and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan_id = 100 + vlan = [100] + ttls_passwd = "passwordinvalidvlanuser" + eap = "TTLS" + identity = "invalidvlanuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + get_test_library.add_vlan(vlan_ids=[vlan]) - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan_id, - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, + security = security, extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, ttls_passwd = ttls_passwd, + ieee80211w = 0, identity = identity, num_sta = 1, dut_data = setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("ssid vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.periodic_reauthentication @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication", url="https://telecominfraproject.atlassian.net/browse/WIFI-5707") - def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("Test for radius vlan information retained after periodic reauthentication") + def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "periodic_reauthentication and wpa2_enterprise and vlan" + pytest -m "periodic_reauthentication and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[1], - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, security = security, + extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, + ttls_passwd = ttls_passwd, ieee80211w = 0, + identity = identity, num_sta = 1, + dut_data = setup_configuration, cleanup=False) + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip = lf_test.station_ip[station_names_fiveg[0]] - - count = 0 - # print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - # print("vlan ip...", eth_vlan_ip) - # print("eth_vlan_ip..", eth_ip) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] eth_vlan_ip_1 = eth_rad_vlan_ip.split('.') - sta_ip_1 = sta_ip.split('.') - if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False - elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False - print(sta_ip_1) - for k in range(0, 2): - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): + sta_ip = [] + sta_ip.append(station_ip.split('.')) + for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']: + if list(u.values())[0]['port type'] in ['WIFI-STA']: + station_name = list(u.keys())[0] + sta = station_name.split('.') + get_test_library.local_realm.admin_up(sta) + time.sleep(10) + for i in range(5): + staip = get_test_library.json_get("/port/" + sta[0] + "/" + sta[1] + "/" + sta[2])["interface"]["ip"] + if staip == "0.0.0.0": + time.sleep(10) + else: + break + + sta_ip.append(staip.split('.')) + + for k in sta_ip: + for i, j in zip(k[0:2], eth_vlan_ip_1[0:2]): if i != j: + val = False break else: - if count == 2: - break # allure.attach(name="station ip",body=str(sta_ip)) - continue - count = count + 1 - time.sleep(30) - lf_tools.admin_up_down([station_names_fiveg[0]], option="up") - - sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + station_names_fiveg[0])["interface"]["ip"] - sta_ip_1 = sta_ip.split('.') - print(sta_ip) - allure.attach(name="station ip....", body=str(sta_ip)) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - if count == 2: - assert True - print("Station ip assigned as per dynamic vlan") - elif count == 0: - print("Station ip not assigned as per dynamic vlan") - assert False + val = True + if val: + assert True, result + else: + assert False, result @pytest.mark.absenceofvlanid @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5708") - def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for ssid vlan used in absence of radius vlan") + def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "absenceofvlanid and wpa2_enterprise and vlan" + pytest -m "absenceofvlanid and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan, - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, mode=mode, band=band, eap=eap, + d_vlan=True, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("ssid configured vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid configured vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid configured vlan") - assert False - - ''' - @pytest.mark.unsupported - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @allure.testcase(name="test_dynamic_unsupported_vlan", - url="https://telecominfraproject.atlassian.net/browse/WIFI-5710") - def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): - """ - pytest -m "unsupported and wpa2_enterprise and vlan" - """ - - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] - mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=100, - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') - eth_vlan_ip_1 = eth_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): - if i != j: - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - print("Station ip not assigned as per vlan") - assert False - else: - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - allure.attach(name="vlan ip....", body=str(eth_ip)) - print("Station ip assigned as per vlan") - ''' + assert False, result @pytest.mark.outofboundvlanid @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_outof_bound_vlanid", url="https://telecominfraproject.atlassian.net/browse/WIFI-5711") - def test_out_of_bound_vlanid_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for out of bound vlan identifier") + def test_out_of_bound_vlanid_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "outofboundvlanid and wpa2_enterprise and vlan" + pytest -m "outofboundvlanid and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + vlan = [100] + ttls_passwd = "passwordoutofboundvlanuser" + eap = "TTLS" + identity = "outofboundvlanuser" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan, - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - if lf_test.station_ip[station_names_fiveg[0]] == "0.0.0.0": - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - allure.attach(name="out of bound vlan id..", body=str(7000)) - print("Test Passsed...Client Connection failed") + if station_ip == "0.0.0.0": + assert True, result @pytest.mark.client_association_ap_with_dynamic_vlan @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_client_association_ap_with_dynamic_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5712") - def test_client_association_ap_with_dynamic_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for client association ap with dynamic vlan") + def test_client_association_ap_with_dynamic_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[0], - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("radius vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_radius_vlan_ip_1[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="Upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_same_user_account @pytest.mark.wpa2_enterprise @pytest.mark.fiveg @allure.testcase(name="test_subsequent_user_for_same_user_account", url="https://telecominfraproject.atlassian.net/browse/WIFI-5713") - def test_subsequent_user_for_same_user_account_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("test for subsequent user for same user account") + def test_subsequent_user_for_same_user_account_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan" + pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 + vlan = [100] + ttls_passwd = "passwordA" + eap = "TTLS" + identity = "userA" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') sta_ip = [] - for i in range(0, 2): - station_list.append(lf_tools.fiveg_prefix + str(i)) - print(station_list) - print([station_list[0]]) - for m in range(0, len(station_list)): - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=100, - station_name=[station_list[m]], key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordA", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False) - lf_tools.admin_up_down([station_list[m]], option="up") - sta_ip.append(lf_test.station_ip[station_list[m]]) + for m in range(2): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) if sta_ip[m] == "0.0.0.0": - allure.attach("station didnt recieved ip..") - assert False - print(sta_ip) - time.sleep(30) + assert False, result - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - eth_vlan_ip_1 = eth_vlan_ip.split('.') - for n in range(0, len(station_list)): - sta_ip_1 = sta_ip[n].split('.') - print("station ip...", sta_ip[n]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_vlan_ip_1 = eth_vlan_ip.split('.') + # for n in range(2): + sta_ip_1 = sta_ip[m].split('.') for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[n])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_different_user_account @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan", + @allure.testcase(name="test_subsequent_user_for_different_user_account", url="https://telecominfraproject.atlassian.net/browse/WIFI-5714") - def test_subsequent_user_for_different_user_account_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("test for subsequent user for different user account") + def test_subsequent_user_for_different_user_account_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan" + pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] + eap = "TTLS" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + sta_ip = [] dynamic_vlan_user = ["userA", "userB"] dynamic_vlan_pass = ["passwordA", "passwordB"] - for i in range(0, 2): - station_list.append(lf_tools.fiveg_prefix + str(i)) - for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))): - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[sta], - station_name=[station_list[sta]], key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd=user_pass, ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False) + for user_id, user_pass, cnt in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(vlan))): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", + security=security, extra_securities=extra_secu, mode=mode, band=band, vlan_id=vlan, + num_sta=1, ttls_passwd=user_pass, ieee80211w=0, dut_data=setup_configuration, + eap=eap, identity=user_id) - sta_ip.append(lf_test.station_ip[station_list[sta]]) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[cnt]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] eth_vlan_ip_1 = eth_vlan_ip.split('.') - print(sta_ip) - sta_ip_1 = sta_ip[sta].split('.') - if sta_ip_1 == "0.0.0.0": + sta_ip_1 = sta_ip[cnt].split('.') + if sta_ip_1[0] == '0': allure.attach("station didn't received ip..") - assert False - print("station ip...", lf_test.station_ip[station_list[sta]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[sta])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[sta]))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print(f"{station_list[sta]} ip assigned as per radius vlan") + assert True, result elif not val: - print(f"{station_list[sta]} ip not assigned as per radius vlan") - assert False - lf_tools.admin_up_down([station_list[sta]], option="up") - time.sleep(5) + assert False, result + diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_over_ssid_twog_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_over_ssid_twog_wpa2.py index 0c7737f17..ee7136b27 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_over_ssid_twog_wpa2.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_over_ssid_twog_wpa2.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa2_enterprise and vlan" """ -import os import allure import pytest -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_sanity_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa2_enterprise, - pytest.mark.twog] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan, + pytest.mark.ow_sanity_lf] setup_params_general = { "mode": "VLAN", @@ -32,83 +33,73 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA2 Enterprise Security") +@allure.sub_suite("2.4 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlanOverSsid2GWpa2(object): @pytest.mark.dynamic_precedence_over_ssid @pytest.mark.wpa2_enterprise @pytest.mark.twog - @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan", - url="https://telecominfraproject.atlassian.net/browse/WIFI-5705") - def test_dynamic_precedence_over_ssid_vlan_2g_wpa2(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("Verify that Dynamic VLAN takes precedence over configured SSID VLAN") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5705", name="WIFI-5705") + def test_dynamic_precedence_over_ssid_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan" + To Verify that Dynamic VLAN takes precedence over configured SSID VLAN + Unique Marker: pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan" + """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa2" + extra_secu = [] + band = "twog" vlan = [100,200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[0], - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, + vlan_id=vlan, mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}" + f"\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per dynamic vlan") + assert True, result elif not val: - print("Station ip not assigned as per dynamic vlan") - assert False \ No newline at end of file + assert False, result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_vlan_twog_wpa2.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_vlan_twog_wpa2.py index 71731a0ff..1a3344bb7 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_vlan_twog_wpa2.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa2_enterprise/twog/test_dynamic_vlan_twog_wpa2.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa2_enterprise and vlan" """ -import os import allure import pytest import time -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa2_enterprise, - pytest.mark.twog] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -32,620 +33,459 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan") +# @allure.suite("regression") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA2 Enterprise Security") +@allure.sub_suite("2.4 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlan2GWpa2(object): @pytest.mark.absence_of_radius_vlan_identifier @pytest.mark.wpa2_enterprise @pytest.mark.twog @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", - url="https://telecominfraproject.atlassian.net/browse/WIFI-5704") - def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("Verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5704", name="WIFI-5704") + def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan" + + To verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers + Unique Marker: pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan" + """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan_id = 100 + security = "wpa2" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, + security=security, extra_securities=extra_secu, + vlan_id=vlan, mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration) - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') - print(sta_ip_1) + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - # eth_ip_1 = eth_ip.split('.') + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("upstream ip...", eth_ip) - print("ssid configured vlan ip", eth_vlan_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False elif i == j: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.invalidradiusvlan @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_dynamic_invalid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5706") - def test_dynamic_invalid_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("Test for invalid vlan identifier") + def test_dynamic_invalid_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "invalidradiusvlan and wpa2_enterprise and vlan" + pytest -m "invalidradiusvlan and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan_id = 100 + security = "wpa2" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordinvalidvlanuser" + eap = "TTLS" + identity = "invalidvlanuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + get_test_library.add_vlan(vlan_ids=[vlan]) - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan_id, - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, + security = security, extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, ttls_passwd = ttls_passwd, + ieee80211w = 0, identity = identity, num_sta = 1, dut_data = setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("ssid vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.periodic_reauthentication @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication", url="https://telecominfraproject.atlassian.net/browse/WIFI-5707") - def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("Test for radius vlan information retained after periodic reauthentication") + def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "periodic_reauthentication and wpa2_enterprise and vlan" + pytest -m "periodic_reauthentication and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa2" + extra_secu = [] + band = "twog" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[1], - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, security = security, + extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, + ttls_passwd = ttls_passwd, ieee80211w = 0, + identity = identity, num_sta = 1, + dut_data = setup_configuration, cleanup=False) + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip = lf_test.station_ip[station_names_twog[0]] - count = 0 - # print("station ip...", lf_test.station_ip[station_names_twog[0]]) - # print("vlan ip...", eth_vlan_ip) - # print("eth_vlan_ip..", eth_ip) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + # count = 0 + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] eth_vlan_ip_1 = eth_rad_vlan_ip.split('.') - sta_ip_1 = sta_ip.split('.') - if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False - elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False - print(sta_ip_1) - for k in range(0, 2): - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): + sta_ip = [] + sta_ip.append(station_ip.split('.')) + for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']: + if list(u.values())[0]['port type'] in ['WIFI-STA']: + station_name = list(u.keys())[0] + sta = station_name.split('.') + get_test_library.local_realm.admin_up(sta) + time.sleep(10) + for i in range(5): + x = get_test_library.json_get("/port/" + sta[0] + "/" + sta[1] + "/" + sta[2])["interface"]["ip"] + if x == "0.0.0.0": + time.sleep(10) + else: + break + sta_ip.append(x.split('.')) + for k in sta_ip: + for i, j in zip(k[0:2], eth_vlan_ip_1[0:2]): if i != j: + val = False break else: - if count == 2: - break # allure.attach(name="station ip",body=str(sta_ip)) - continue - count = count + 1 - time.sleep(30) - lf_tools.admin_up_down([station_names_twog[0]], option="up") - - sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + station_names_twog[0])["interface"]["ip"] - sta_ip_1 = sta_ip.split('.') - print(sta_ip) - allure.attach(name="station ip....", body=str(sta_ip)) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - if count == 2: - assert True - print("Station ip assigned as per dynamic vlan") - elif count == 0: - print("Station ip not assigned as per dynamic vlan") - assert False + val = True + if val: + assert True, result + else: + assert False, result @pytest.mark.absenceofvlanid @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5708") - def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for ssid vlan used in absence of radius vlan") + def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "absenceofvlanid and wpa2_enterprise and vlan" + pytest -m "absenceofvlanid and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 + security = "wpa2" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan, - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, mode=mode, band=band, eap=eap, + d_vlan=True, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("ssid configured vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid configured vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid configured vlan") - assert False - - ''' - @pytest.mark.unsupported - @pytest.mark.wpa2_enterprise - @pytest.mark.twog - @allure.testcase(name="test_dynamic_unsupported_vlan", - url="https://telecominfraproject.atlassian.net/browse/WIFI-5710") - def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): - """ - pytest -m "unsupported and wpa2_enterprise and vlan" - """ - - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] - mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=100, - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') - eth_vlan_ip_1 = eth_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): - if i != j: - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - print("Station ip not assigned as per vlan") - assert False - else: - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - allure.attach(name="vlan ip....", body=str(eth_ip)) - print("Station ip assigned as per vlan") - ''' + assert False, result @pytest.mark.outofboundvlanid @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_outof_bound_vlanid", url="https://telecominfraproject.atlassian.net/browse/WIFI-5711") - def test_out_of_bound_vlanid_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for out of bound vlan identifier") + def test_out_of_bound_vlanid_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "outofboundvlanid and wpa2_enterprise and vlan" + pytest -m "outofboundvlanid and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + security = "wpa2" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordoutofboundvlanuser" + eap = "TTLS" + identity = "outofboundvlanuser" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan, - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - if lf_test.station_ip[station_names_twog[0]] == "0.0.0.0": - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - allure.attach(name="out of bound vlan id..", body=str(7000)) - print("Test Passsed...Client Connection failed") + if station_ip == "0.0.0.0": + assert True, result @pytest.mark.client_association_ap_with_dynamic_vlan @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_client_association_ap_with_dynamic_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5712") - def test_client_association_ap_with_dynamic_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for client association ap with dynamic vlan") + def test_client_association_ap_with_dynamic_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan" + pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa2" + extra_secu = [] + band = "twog" vlan = [100, 200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[0], - station_name=station_names_twog, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("radius vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_radius_vlan_ip_1[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="Upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_same_user_account @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_subsequent_user_for_same_user_account", url="https://telecominfraproject.atlassian.net/browse/WIFI-5713") - def test_subsequent_user_for_same_user_account_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("test for subsequent user for same user account") + def test_subsequent_user_for_same_user_account_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan" + pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 + security = "wpa2" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordA" + eap = "TTLS" + identity = "userA" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') sta_ip = [] - for i in range(0, 2): - station_list.append(lf_tools.twog_prefix + str(i)) - print(station_list) - print([station_list[0]]) - for m in range(0, len(station_list)): - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=100, - station_name=[station_list[m]], key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordA", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False) - lf_tools.admin_up_down([station_list[m]], option="up") - sta_ip.append(lf_test.station_ip[station_list[m]]) + for m in range(2): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) if sta_ip[m] == "0.0.0.0": - allure.attach("station didnt recieved ip..") - assert False - print(sta_ip) - time.sleep(30) + assert False, result - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - eth_vlan_ip_1 = eth_vlan_ip.split('.') - for n in range(0, len(station_list)): - sta_ip_1 = sta_ip[n].split('.') - print("station ip...", sta_ip[n]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_vlan_ip_1 = eth_vlan_ip.split('.') + # for n in range(0, len(station_list)): + sta_ip_1 = sta_ip[m].split('.') for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[n])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_different_user_account @pytest.mark.wpa2_enterprise @pytest.mark.twog @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-5714") - def test_subsequent_user_for_different_user_account_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("test for subsequent user for different user account") + def test_subsequent_user_for_different_user_account_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan" + pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa2" + extra_secu = [] + band = "twog" mode = "VLAN" - val = "" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + eap = "TTLS" + val = "" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - station_list = [] sta_ip = [] dynamic_vlan_user = ["userA", "userB"] dynamic_vlan_pass = ["passwordA", "passwordB"] - for i in range(0, 2): - station_list.append(lf_tools.twog_prefix + str(i)) - for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))): - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[sta], - station_name=[station_list[sta]], key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd=user_pass, ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False) + for user_id, user_pass, cnt in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(vlan))): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", + security=security, extra_securities=extra_secu, + mode=mode, band=band, vlan_id=vlan, dut_data=setup_configuration, + num_sta=1, ttls_passwd=user_pass, ieee80211w=0, + wep_key="NA", ca_cert="NA", eap=eap, identity=user_id) - sta_ip.append(lf_test.station_ip[station_list[sta]]) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[cnt]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] eth_vlan_ip_1 = eth_vlan_ip.split('.') print(sta_ip) - sta_ip_1 = sta_ip[sta].split('.') - if sta_ip_1 == "0.0.0.0": + sta_ip_1 = sta_ip[cnt].split('.') + if sta_ip_1[0] == "0.": allure.attach("station didn't received ip..") - assert False - print("station ip...", lf_test.station_ip[station_list[sta]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[sta])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print(f"{station_list[sta]} ip assigned as per radius vlan") + assert True, result elif not val: - print(f"{station_list[sta]} ip not assigned as per radius vlan") - assert False - lf_tools.admin_up_down([station_list[sta]], option="up") - time.sleep(5) + assert False, result + diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa3.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa3.py index b441637a9..c6b0348d7 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa3.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_over_ssid_fiveg_wpa3.py @@ -1,20 +1,21 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa3_enterprise and vlan" """ -import os import allure import pytest -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa3_enterprise, - pytest.mark.fiveg] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -31,15 +32,17 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa3_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA3 Enterprise Security") +@allure.sub_suite("5 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlanOverSsid5GWpa3(object): @pytest.mark.dynamic_precedence_over_ssid @@ -47,67 +50,54 @@ class TestDynamicVlanOverSsid5GWpa3(object): @pytest.mark.fiveg @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6096") - def test_dynamic_precedence_over_ssid_vlan_5g_wpa3(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("Test for dynamic precedence over ssid") + def test_dynamic_precedence_over_ssid_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "dynamic_precedence_over_ssid and wpa3_enterprise and vlan" + pytest -m "dynamic_precedence_over_ssid and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] mode = "VLAN" + band = "fiveg" vlan = [100,200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[0], - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) - - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}" + f"\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per dynamic vlan") + assert True, result elif not val: - print("Station ip not assigned as per dynamic vlan") - assert False \ No newline at end of file + assert False, result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa3.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa3.py index 05dcaea05..489281b79 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa3.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/fiveg/test_dynamic_vlan_fiveg_wpa3.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa3_enterprise and vlan" """ -import os import allure import pytest import time -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa3_enterprise, - pytest.mark.fiveg] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -32,15 +33,17 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa3_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA3 Enterprise Security") +@allure.sub_suite("5 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlan5GWpa3(object): @pytest.mark.absence_of_radius_vlan_identifier @@ -48,603 +51,433 @@ class TestDynamicVlan5GWpa3(object): @pytest.mark.fiveg @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") - def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("Test for ssid vlan in the absence of radius vlan identifier") + def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m " absence_of_radius_vlan_identifier and wpa3_enterprise and vlan" + pytest -m " absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan_id = 100 + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') - print(sta_ip_1) + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - # eth_ip_1 = eth_ip.split('.') + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("upstream ip...", eth_ip) - print("ssid configured vlan ip", eth_vlan_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False elif i == j: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.invalidradiusvlan @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_dynamic_invalid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") - def test_dynamic_invalid_vlan_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("Test for invalid vlan identifier") + def test_dynamic_invalid_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "invalidradiusvlan and wpa3_enterprise and vlan" + pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan_id = 100 + vlan = [100] + ttls_passwd = "passwordinvalidvlanuser" + eap = "TTLS" + identity = "invalidvlanuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + get_test_library.add_vlan(vlan_ids=[vlan]) - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan_id, - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, key_mgmt="WPA-EAP-SHA256", + security = security, extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, ttls_passwd = ttls_passwd, + ieee80211w = 0, identity = identity, num_sta = 1, dut_data = setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("ssid vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.periodic_reauthentication @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication", url="https://telecominfraproject.atlassian.net/browse/WIFI-6098") - def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("Test for radius vlan information retained after periodic reauthentication") + def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "periodic_reauthentication and wpa3_enterprise and vlan" + pytest -m "periodic_reauthentication and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[1], - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, security = security, + extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, + ttls_passwd = ttls_passwd, ieee80211w = 0, + identity = identity, num_sta = 1, key_mgmt="WPA-EAP-SHA256", + dut_data = setup_configuration, cleanup=False) + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip = lf_test.station_ip[station_names_fiveg[0]] - count = 0 - # print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - # print("vlan ip...", eth_vlan_ip) - # print("eth_vlan_ip..", eth_ip) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] eth_vlan_ip_1 = eth_rad_vlan_ip.split('.') - sta_ip_1 = sta_ip.split('.') - if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False - elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False - print(sta_ip_1) - for k in range(0, 2): - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): + sta_ip = [] + sta_ip.append(station_ip.split('.')) + for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']: + if list(u.values())[0]['port type'] in ['WIFI-STA']: + station_name = list(u.keys())[0] + sta = station_name.split('.') + get_test_library.local_realm.admin_up(sta) + time.sleep(10) + for i in range(5): + x = get_test_library.json_get("/port/" + sta[0] + "/" + sta[1] + "/" + sta[2])["interface"]["ip"] + if x == "0.0.0.0": + time.sleep(10) + else: + break + sta_ip.append(x.split('.')) + for k in sta_ip: + for i, j in zip(k[0:2], eth_vlan_ip_1[0:2]): if i != j: + val = False break else: - if count == 2: - break # allure.attach(name="station ip",body=str(sta_ip)) - continue - count = count + 1 - time.sleep(30) - lf_tools.admin_up_down([station_names_fiveg[0]], option="up") - - sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + station_names_fiveg[0])["interface"]["ip"] - sta_ip_1 = sta_ip.split('.') - print(sta_ip) - allure.attach(name="station ip....", body=str(sta_ip)) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - if count == 2: - assert True - print("Station ip assigned as per dynamic vlan") - elif count == 0: - print("Station ip not assigned as per dynamic vlan") - assert False + val = True + if val: + assert True, result + else: + assert False, result @pytest.mark.absenceofvlanid @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") - def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for ssid vlan used in absence of radius vlan") + def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "absenceofvlanid and wpa3_enterprise and vlan" + pytest -m "absenceofvlanid and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan, - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, mode=mode, band=band, eap=eap, + d_vlan=True, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration, key_mgmt="WPA-EAP-SHA256") - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("ssid configured vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid configured vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid configured vlan") - assert False - - ''' - @pytest.mark.unsupported - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - @allure.testcase(name="test_dynamic_unsupported_vlan", - url="https://telecominfraproject.atlassian.net/browse/WIFI-6102") - def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): - """ - pytest -m "unsupported and wpa2_enterprise and vlan" - """ - - profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] - mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="fiveg", vlan_id=100, - station_name=station_names_fiveg, key_mgmt="WPA-EAP", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') - eth_vlan_ip_1 = eth_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): - if i != j: - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - print("Station ip not assigned as per vlan") - assert False - else: - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - allure.attach(name="vlan ip....", body=str(eth_ip)) - print("Station ip assigned as per vlan") - ''' + assert False, result @pytest.mark.outofboundvlanid @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_outof_bound_vlanid", url="https://telecominfraproject.atlassian.net/browse/WIFI-6103") - def test_out_of_bound_vlanid_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for out of bound vlan identifier") + def test_out_of_bound_vlanid_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "outofboundvlanid and wpa3_enterprise and vlan" + pytest -m "outofboundvlanid and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + vlan = [100] + ttls_passwd = "passwordoutofboundvlanuser" + eap = "TTLS" + identity = "outofboundvlanuser" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan, - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - if lf_test.station_ip[station_names_fiveg[0]] == "0.0.0.0": - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - allure.attach(name="out of bound vlan id..", body=str(7000)) - print("Test Passsed...Client Connection failed") + if station_ip == "0.0.0.0": + assert True, result @pytest.mark.client_association_ap_with_dynamic_vlan @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_client_association_ap_with_dynamic_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6104") - def test_client_association_ap_with_dynamic_vlan_5g_wpa3(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_fiveg): + @allure.title("test for client association ap with dynamic vlan") + def test_client_association_ap_with_dynamic_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "client_association_ap_with_dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "client_association_ap_with_dynamic_vlan and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[0], - station_name=station_names_fiveg, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_fiveg[0]]) - print("radius vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_radius_vlan_ip_1[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="Upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_same_user_account @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_subsequent_user_for_same_user_account", url="https://telecominfraproject.atlassian.net/browse/WIFI-6105") - def test_subsequent_user_for_same_user_account_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("test for subsequent user for same user account") + def test_subsequent_user_for_same_user_account_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_same_user_account and wpa3_enterprise and vlan" + pytest -m "subsequent_user_for_same_user_account and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" - vlan = 100 + vlan = [100] + ttls_passwd = "passwordA" + eap = "TTLS" + identity = "userA" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') sta_ip = [] - for i in range(0, 2): - station_list.append(lf_tools.fiveg_prefix + str(i)) - print(station_list) - print([station_list[0]]) - for m in range(0, len(station_list)): - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=100, - station_name=[station_list[m]], key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordA", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False) - lf_tools.admin_up_down([station_list[m]], option="up") - sta_ip.append(lf_test.station_ip[station_list[m]]) + for m in range(2): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) if sta_ip[m] == "0.0.0.0": - allure.attach("station didnt recieved ip..") - assert False - print(sta_ip) - time.sleep(30) + assert False, result - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - eth_vlan_ip_1 = eth_vlan_ip.split('.') - for n in range(0, len(station_list)): - sta_ip_1 = sta_ip[n].split('.') - print("station ip...", sta_ip[n]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_vlan_ip_1 = eth_vlan_ip.split('.') + # for n in range(2): + sta_ip_1 = sta_ip[m].split('.') for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[n])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_different_user_account @pytest.mark.wpa3_enterprise @pytest.mark.fiveg @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6106") - def test_subsequent_user_for_different_user_account_5g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_fiveg): + @allure.title("test for subsequent user for different user account") + def test_subsequent_user_for_different_user_account_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_different_user_account and wpa3_enterprise and vlan" + pytest -m "subsequent_user_for_different_user_account and wpa3_enterprise and vlan and fiveg" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_5G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "fiveg" mode = "VLAN" vlan = [100, 200] + eap = "TTLS" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') sta_ip = [] dynamic_vlan_user = ["userA", "userB"] dynamic_vlan_pass = ["passwordA", "passwordB"] - for i in range(0, 2): - station_list.append(lf_tools.fiveg_prefix + str(i)) - for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))): - lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="fiveg", vlan_id=vlan[sta], - station_name=[station_list[sta]], key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd=user_pass, ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False) + for user_id, user_pass, cnt in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(vlan))): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", + security=security, extra_securities=extra_secu, mode=mode, band=band, vlan_id=vlan, + num_sta=1, ttls_passwd=user_pass, ieee80211w=0, dut_data=setup_configuration, + eap=eap, identity=user_id, key_mgmt="WPA-EAP-SHA256") - sta_ip.append(lf_test.station_ip[station_list[sta]]) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[cnt]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] eth_vlan_ip_1 = eth_vlan_ip.split('.') - print(sta_ip) - sta_ip_1 = sta_ip[sta].split('.') - if sta_ip_1 == "0.0.0.0": + sta_ip_1 = sta_ip[cnt].split('.') + if sta_ip_1[0] == '0': allure.attach("station didn't received ip..") - assert False - print("station ip...", lf_test.station_ip[station_list[sta]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[sta])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[sta]))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print(f"{station_list[sta]} ip assigned as per radius vlan") + assert True, result elif not val: - print(f"{station_list[sta]} ip not assigned as per radius vlan") - assert False - lf_tools.admin_up_down([station_list[sta]], option="up") - time.sleep(5) + assert False, result + diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_over_ssid_twog_wpa3.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_over_ssid_twog_wpa3.py index abec88ee5..cd147e095 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_over_ssid_twog_wpa3.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_over_ssid_twog_wpa3.py @@ -1,20 +1,21 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa3_enterprise and vlan" """ -import os import allure import pytest -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa3_enterprise, - pytest.mark.twog] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -31,15 +32,17 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa3_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA3 Enterprise Security") +@allure.sub_suite("2.4 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlanOverSsid2GWpa3(object): @pytest.mark.dynamic_precedence_over_ssid @@ -47,67 +50,54 @@ class TestDynamicVlanOverSsid2GWpa3(object): @pytest.mark.twog @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6096") - def test_dynamic_precedence_over_ssid_vlan_2g_wpa3(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("Test for dynamic precedence over ssid") + def test_dynamic_precedence_over_ssid_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "dynamic_precedence_over_ssid and wpa3_enterprise and vlan" + pytest -m "dynamic_precedence_over_ssid and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa3" + extra_secu = [] + band = "twog" vlan = [100,200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[0], - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, key_mgmt="WPA-EAP-SHA256", + vlan_id=vlan, mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}" + f"\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per dynamic vlan") + assert True, result elif not val: - print("Station ip not assigned as per dynamic vlan") - assert False \ No newline at end of file + assert False, result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_vlan_twog_wpa3.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_vlan_twog_wpa3.py index 5a177b1ea..9c8b87ac8 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_vlan_twog_wpa3.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/dynamic_vlan/wpa3_enterprise/twog/test_dynamic_vlan_twog_wpa3.py @@ -1,21 +1,22 @@ """ Dynamic_Vlan: VLAN Mode - pytest -m "dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "dynamic_vlan_tests and wpa3_enterprise and vlan" """ -import os import allure import pytest import time -from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA -from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA +import importlib +import logging -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_dvlan_tests_lf, - pytest.mark.wpa3_enterprise, - pytest.mark.twog] +lf_library = importlib.import_module("configuration") +DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA +DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA + +pytestmark = [pytest.mark.dynamic_vlan_tests, + pytest.mark.vlan] setup_params_general = { "mode": "VLAN", @@ -32,15 +33,17 @@ setup_params_general = { } -@allure.suite("regression") -@allure.feature("VLAN MODE wpa3_enterprise Dynamic Vlan") +@allure.parent_suite("Dynamic VLAN Test") +@allure.suite("WPA3 Enterprise Security") +@allure.sub_suite("2.4 GHz Band") +@allure.feature("Dynamic VLAN Test") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") +@pytest.mark.usefixtures("setup_configuration") class TestDynamicVlan2GWpa3(object): @pytest.mark.absence_of_radius_vlan_identifier @@ -48,603 +51,435 @@ class TestDynamicVlan2GWpa3(object): @pytest.mark.twog @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") - def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("Test for ssid vlan in the absence of radius vlan identifier") + def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m " absence_of_radius_vlan_identifier and wpa3_enterprise and vlan" + pytest -m "absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan_id = 100 + security = "wpa3" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, key_mgmt="WPA-EAP-SHA256", + security=security, extra_securities=extra_secu, + vlan_id=vlan, mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration) - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') - print(sta_ip_1) + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - # eth_ip_1 = eth_ip.split('.') + logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}") if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("upstream ip...", eth_ip) - print("ssid configured vlan ip", eth_vlan_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False elif i == j: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.invalidradiusvlan @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_dynamic_invalid_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") - def test_dynamic_invalid_vlan_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("Test for invalid vlan identifier") + def test_dynamic_invalid_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "invalidradiusvlan and wpa3_enterprise and vlan" + pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan_id = 100 + security = "wpa3" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordinvalidvlanuser" + eap = "TTLS" + identity = "invalidvlanuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan_id]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + get_test_library.add_vlan(vlan_ids=[vlan]) - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan_id, - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, key_mgmt="WPA-EAP-SHA256", + security = security, extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, ttls_passwd = ttls_passwd, + ieee80211w = 0, identity = identity, num_sta = 1, dut_data = setup_configuration) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("ssid vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid vlan") - assert False + assert False, result @pytest.mark.periodic_reauthentication @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication", url="https://telecominfraproject.atlassian.net/browse/WIFI-6098") - def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("Test for radius vlan information retained after periodic reauthentication") + def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "periodic_reauthentication and wpa3_enterprise and vlan" + pytest -m "periodic_reauthentication and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa3" + extra_secu = [] + band = "twog" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[1], - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, security = security, + extra_securities = extra_secu, vlan_id = vlan, + mode = mode, band = band, eap = eap, + ttls_passwd = ttls_passwd, ieee80211w = 0, + identity = identity, num_sta = 1, key_mgmt="WPA-EAP-SHA256", + dut_data = setup_configuration, cleanup=False) + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip = lf_test.station_ip[station_names_twog[0]] - count = 0 - # print("station ip...", lf_test.station_ip[station_names_twog[0]]) - # print("vlan ip...", eth_vlan_ip) - # print("eth_vlan_ip..", eth_ip) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] eth_vlan_ip_1 = eth_rad_vlan_ip.split('.') - sta_ip_1 = sta_ip.split('.') - if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False - elif eth_vlan_ip_1[0] == "0": - print("radius configured vlan didnt recieved ip") - assert False - print(sta_ip_1) - for k in range(0, 2): - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): + sta_ip = [] + sta_ip.append(station_ip.split('.')) + for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']: + if list(u.values())[0]['port type'] in ['WIFI-STA']: + station_name = list(u.keys())[0] + sta = station_name.split('.') + get_test_library.local_realm.admin_up(sta) + time.sleep(10) + for i in range(5): + x = get_test_library.json_get("/port/" + sta[0] + "/" + sta[1] + "/" + sta[2])["interface"]["ip"] + if x == "0.0.0.0": + time.sleep(10) + else: + break + sta_ip.append(x.split('.')) + for k in sta_ip: + for i, j in zip(k[0:2], eth_vlan_ip_1[0:2]): if i != j: + val = False break else: - if count == 2: - break # allure.attach(name="station ip",body=str(sta_ip)) - continue - count = count + 1 - time.sleep(30) - lf_tools.admin_up_down([station_names_twog[0]], option="up") - - sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + station_names_twog[0])["interface"]["ip"] - sta_ip_1 = sta_ip.split('.') - print(sta_ip) - allure.attach(name="station ip....", body=str(sta_ip)) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - if count == 2: - assert True - print("Station ip assigned as per dynamic vlan") - elif count == 0: - print("Station ip not assigned as per dynamic vlan") - assert False + val = True + if val: + assert True, result + else: + assert False, result @pytest.mark.absenceofvlanid @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") - def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for ssid vlan used in absence of radius vlan") + def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "absenceofvlanid and wpa3_enterprise and vlan" + pytest -m "absenceofvlanid and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 + security = "wpa3" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordvlannotsentuser" + eap = "TTLS" + identity = "vlannotsentuser" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan, - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordvlannotsentuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, mode=mode, band=band, eap=eap, + d_vlan=True, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, + num_sta=1, dut_data=setup_configuration, key_mgmt="WPA-EAP-SHA256") - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_vlan_ip_1 = eth_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("ssid configured vlan ip...", eth_vlan_ip) - print("upstream ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_vlan_ip[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per ssid configured vlan") + assert True, result elif not val: - print("Station ip not assigned as per ssid configured vlan") - assert False - - ''' - @pytest.mark.unsupported - @pytest.mark.wpa3_enterprise - @pytest.mark.twog - @allure.testcase(name="test_dynamic_unsupported_vlan", - url="https://telecominfraproject.atlassian.net/browse/WIFI-6102") - def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): - """ - pytest -m "unsupported and wpa3_enterprise and vlan" - """ - - profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] - mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[], - mode=mode, band="twog", vlan_id=100, - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordinvalidvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') - eth_vlan_ip_1 = eth_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) - for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): - if i != j: - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - print("Station ip not assigned as per vlan") - assert False - else: - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="vlan ip....", body=str(eth_vlan_ip)) - allure.attach(name="vlan ip....", body=str(eth_ip)) - print("Station ip assigned as per vlan") - ''' + assert False, result @pytest.mark.outofboundvlanid @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_outof_bound_vlanid", url="https://telecominfraproject.atlassian.net/browse/WIFI-6103") - def test_out_of_bound_vlanid_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for out of bound vlan identifier") + def test_out_of_bound_vlanid_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "outofboundvlanid and wpa3_enterprise and vlan" + pytest -m "outofboundvlanid and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) + security = "wpa3" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordoutofboundvlanuser" + eap = "TTLS" + identity = "outofboundvlanuser" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') + - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan, - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True) - - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - if lf_test.station_ip[station_names_twog[0]] == "0.0.0.0": - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - assert True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) - allure.attach(name="out of bound vlan id..", body=str(7000)) - print("Test Passsed...Client Connection failed") + if station_ip == "0.0.0.0": + assert True, result @pytest.mark.client_association_ap_with_dynamic_vlan @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_client_association_ap_with_dynamic_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6104") - def test_client_association_ap_with_dynamic_vlan_2g_wpa3(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs, - create_lanforge_chamberview_dut, lf_test, get_configuration, - station_names_twog): + @allure.title("test for client association ap with dynamic vlan") + def test_client_association_ap_with_dynamic_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "client_association_ap_with_dynamic_vlan and wpa3_enterprise and vlan" + pytest -m "client_association_ap_with_dynamic_vlan and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" + security = "wpa3" + extra_secu = [] + band = "twog" vlan = [100, 200] + ttls_passwd = "passwordB" + eap = "TTLS" + identity = "userB" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[0], - station_name=station_names_twog, key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordB", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True) + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) - eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] - eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + port_resources[2])["interface"]["ip"] - sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.') + sta_ip_1 = station_ip.split('.') eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.') - print("station ip...", lf_test.station_ip[station_names_twog[0]]) - print("radius vlan ip...", eth_radius_vlan_ip) - print("eth_upstream_ip..", eth_ip) if sta_ip_1[0] == "0": - print("station didnt received any ip") - allure.attach("station didnt recieved ip..") - assert False + assert False, result elif eth_radius_vlan_ip_1[0] == "0": - print("ssid configured vlan didnt recieved ip") - assert False + assert False, result for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]])) - allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0]))) - allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip)) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1]))) - allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip)) - allure.attach(name="Upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_same_user_account @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_subsequent_user_for_same_user_account", url="https://telecominfraproject.atlassian.net/browse/WIFI-6105") - def test_subsequent_user_for_same_user_account_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("test for subsequent user for same user account") + def test_subsequent_user_for_same_user_account_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_same_user_account and wpa3_enterprise and vlan" + pytest -m "subsequent_user_for_same_user_account and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] mode = "VLAN" - vlan = 100 + security = "wpa3" + extra_secu = [] + band = "twog" + vlan = [100] + ttls_passwd = "passwordA" + eap = "TTLS" + identity = "userA" val = "" - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=[vlan]) - - station_list = [] + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') sta_ip = [] - for i in range(0, 2): - station_list.append(lf_tools.twog_prefix + str(i)) - print(station_list) - print([station_list[0]]) - for m in range(0, len(station_list)): - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=100, - station_name=[station_list[m]], key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd="passwordA", ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False) - lf_tools.admin_up_down([station_list[m]], option="up") - sta_ip.append(lf_test.station_ip[station_list[m]]) + for m in range(2): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + extra_securities=extra_secu, vlan_id=vlan, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, ieee80211w=0, + identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", + dut_data=setup_configuration) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) if sta_ip[m] == "0.0.0.0": - allure.attach("station didnt recieved ip..") - assert False - print(sta_ip) - time.sleep(30) + assert False, result - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] - eth_vlan_ip_1 = eth_vlan_ip.split('.') - for n in range(0, len(station_list)): - sta_ip_1 = sta_ip[n].split('.') - print("station ip...", sta_ip[n]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"] + eth_vlan_ip_1 = eth_vlan_ip.split('.') + sta_ip_1 = sta_ip[m].split('.') for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[n])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print("Station ip assigned as per radius vlan") + assert True, result elif not val: - print("Station ip not assigned as per radius vlan") - assert False + assert False, result @pytest.mark.subsequent_user_for_different_user_account @pytest.mark.wpa3_enterprise @pytest.mark.twog @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan", url="https://telecominfraproject.atlassian.net/browse/WIFI-6106") - def test_subsequent_user_for_different_user_account_2g_wpa3(self, get_vif_state, lf_tools, get_lf_logs, - get_ap_logs, - create_lanforge_chamberview_dut, lf_test, - get_configuration, - station_names_twog): + @allure.title("test for subsequent user for different user account") + def test_subsequent_user_for_different_user_account_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): """ - pytest -m "subsequent_user_for_different_user_account and wpa3_enterprise and vlan" + pytest -m "subsequent_user_for_different_user_account and wpa3_enterprise and vlan and twog" """ profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] - ssid_2G = profile_data[0]["ssid_name"] + ssid_name = profile_data[0]["ssid_name"] + security = "wpa3" + extra_secu = [] + band = "twog" mode = "VLAN" - val = "" vlan = [100, 200] - upstream_port = lf_tools.upstream_port - print(upstream_port) - port_resources = upstream_port.split(".") - print(lf_tools.dut_idx_mapping) - lf_tools.reset_scenario() - lf_tools.add_vlan(vlan_ids=vlan) + eap = "TTLS" + val = "" + port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') - station_list = [] sta_ip = [] dynamic_vlan_user = ["userA", "userB"] dynamic_vlan_pass = ["passwordA", "passwordB"] - for i in range(0, 2): - station_list.append(lf_tools.twog_prefix + str(i)) - for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))): - lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa3", extra_securities=[], - mode=mode, band="twog", vlan_id=vlan[sta], - station_name=[station_list[sta]], key_mgmt="WPA-EAP-SHA256", - pairwise="NA", group="NA", wpa_psk="DEFAULT", - ttls_passwd=user_pass, ieee80211w=0, - wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False) + for user_id, user_pass, cnt in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(vlan))): + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", + security=security, extra_securities=extra_secu, key_mgmt="WPA-EAP-SHA256", + mode=mode, band=band, vlan_id=vlan, dut_data=setup_configuration, + num_sta=1, ttls_passwd=user_pass, ieee80211w=0, + wep_key="NA", ca_cert="NA", eap=eap, identity=user_id) - sta_ip.append(lf_test.station_ip[station_list[sta]]) + station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip'] + sta_ip.append(station_ip) - eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"] + eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + + "/" + port_resources[2] + "." + str(vlan[cnt]))["interface"]["ip"] - eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + - "/" + port_resources[2])["interface"]["ip"] eth_vlan_ip_1 = eth_vlan_ip.split('.') print(sta_ip) - sta_ip_1 = sta_ip[sta].split('.') - if sta_ip_1 == "0.0.0.0": + sta_ip_1 = sta_ip[cnt].split('.') + if sta_ip_1[0] == "0.": allure.attach("station didn't received ip..") - assert False - print("station ip...", lf_test.station_ip[station_list[sta]]) - print("vlan ip...", eth_vlan_ip) - print("eth_vlan_ip..", eth_ip) + assert False, result for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]): if i != j: val = False else: val = True - allure.attach(name="station ip....", body=str(sta_ip[sta])) - allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan))) - allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip)) - allure.attach(name="upstream port....", body=str(port_resources[2])) - allure.attach(name="upstream ip....", body=str(eth_ip)) if val: - assert True - print(f"{station_list[sta]} ip assigned as per radius vlan") + assert True, result elif not val: - print(f"{station_list[sta]} ip not assigned as per radius vlan") - assert False - lf_tools.admin_up_down([station_list[sta]], option="up") - time.sleep(5) + assert False, result + diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/fiveg_radio/test_vlan_fiveg.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/fiveg_radio/test_vlan_fiveg.py deleted file mode 100644 index c08bcb4a7..000000000 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/fiveg_radio/test_vlan_fiveg.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - Create VLAN ,connect stations and flow traffic through it : vlan Mode - pytest -m test_vlan_config_5g_radio -""" - -import time -import allure -import pytest - - -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_multi_vlan_tests_lf, - pytest.mark.fiveg] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - - "wpa": [{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 125}], - - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 200}], - - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 150}], - }, - "rf": {}, - "radius": False -} - - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanConfigFivegRadio(object): - - @pytest.mark.wpa - @pytest.mark.fiveg - @pytest.mark.valid_client_ip_wpa_fiveg # wifi-2169 - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_station_ip_wpa_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2169") - def test_station_ip_wpa_ssid_5g(self, lf_test, lf_tools, - station_names_fiveg, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa, fiveg - pytest -m valid_client_ip_wpa_fiveg - """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa" - mode = "VLAN" - band = "fiveg" - vlan = 125 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - print("upstream_port: ", upstream_port) - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_fiveg) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.valid_client_ip_wpa2_fiveg # wifi-2157 - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_station_ip_wpa2_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2157") - def test_station_ip_wpa2_ssid_5g(self, lf_test, lf_tools, - station_names_fiveg, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa2, fiveg - pytest -m valid_client_ip_wpa2_fiveg - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "fiveg" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.disable_vlan_fiveg # wifi-2174 - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_disable_vlan_wpa2_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2174") - def test_disable_vlan_wpa2_ssid_5g(self, lf_test, lf_tools, - station_names_fiveg, - test_cases, get_configuration, get_lf_logs): - """ - Client connectivity using vlan, wpa2, fiveg - pytest -m disable_vlan_fiveg - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "fiveg" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - sta_resource = lanforge_data["2.4G-Radio"][0].split(".") - - vlan_alias = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["alias"] - - req_url = "cli-json/set_port" - lf_tools.json_post(req_url, port_resources[0], port_resources[1], vlan_alias, 1, 8388608) - down = False - count = 0 - while not down: - down = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["down"] - time.sleep(1) - count += 1 - if count == 30: - break - - passes = 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 not passes: - sta_info = lf_tools.json_get("/port/" + sta_resource[0] + "/" + sta_resource[1] + "/" + - station_names_fiveg[0])["interface"] - lf_test.allure_report_table_format(dict_data=sta_info, key="Interface", value="Value", name=station_names_fiveg[0]) - station_ip = sta_info["ip"] - print("station did not get an IP. Test passed") - print("station ip: ", station_ip) - assert True - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass - - @pytest.mark.open - @pytest.mark.fiveg - @pytest.mark.valid_client_ip_open_fiveg # wifi-2161 - @allure.testcase(name="test_station_ip_open_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2161") - def test_station_ip_open_ssid_5g(self, lf_test, lf_tools, - station_names_fiveg, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, open, fiveg - pytest -m valid_client_ip_open_fiveg - """ - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - security_key = "[BLANK]" - security = "open" - mode = "VLAN" - band = "fiveg" - vlan = 100 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_fiveg) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass - - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.fiveg - @pytest.mark.test_station_ip_wpa_wpa2_ssid_5g # wifi-2167 - @allure.testcase(name="test_station_ip_wpa_wpa2_personal_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2167") - def test_station_ip_wpa_wpa2_personal_ssid_5g(self, lf_test, - lf_tools, station_names_fiveg, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa, wpa2, fiveg - pytest -m test_station_ip_wpa_wpa2_ssid_5g - """ - profile_data = setup_params_general["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa" - extra_secu = ["wpa2"] - mode = "VLAN" - band = "fiveg" - vlan = 150 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_fiveg) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.enable_vlan_fiveg # wifi-2172 - @allure.testcase(name="test_station_ip_wpa2_personal_ssid_5g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2172") - def test_enable_vlan_wpa2_ssid_5g(self, lf_test, lf_tools, - station_names_fiveg, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa2, fiveg - pytest -m enable_vlan_fiveg - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "fiveg" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_fiveg) - vlan_alias = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["alias"] - lf_tools.json_post("cli-json/set_port", port_resources[0], port_resources[1], vlan_alias, 0, 8388610) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_fiveg, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_fiveg) - except: - pass diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/__init__.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/__init__.py similarity index 100% rename from tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/__init__.py rename to tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/__init__.py diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_fiveg.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_fiveg.py new file mode 100644 index 000000000..9b492781d --- /dev/null +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_fiveg.py @@ -0,0 +1,178 @@ +""" + Create VLAN ,connect stations and flow traffic through it : vlan Mode + pytest -m multi_vlan_tests +""" + +import allure +import pytest + +pytestmark = [pytest.mark.ow_regression_lf, + pytest.mark.multi_vlan_tests, + pytest.mark.fiveg] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], + + "wpa": [{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 125}], + + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 200}], + + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 150}], + }, + "rf": {}, + "radius": False +} + + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@allure.feature("Multi VLAN Test") +@allure.parent_suite("Multi VLAN Test") +@allure.suite("VLAN Mode") +@allure.sub_suite("5Ghz") +@pytest.mark.usefixtures("setup_configuration") +class TestMultiVlan(object): + + @pytest.mark.open + @pytest.mark.fiveg + @pytest.mark.multi_vlan + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2161", name="WIFI-2161") + @allure.title("Test VLAN with Open Security Mode") + def test_multi_vlan_open_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + Multi VLAN Test with open encryption 5 GHz Band + pytest -m "multi_vlan_tests and open and fiveg" + """ + profile_data = {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100} + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "fiveg" + vlan = [100] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @pytest.mark.multi_vlan + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2169", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2169") + @allure.title("Test VLAN with WPA Security Mode") + def test_multi_vlan_wpa_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify that a client operating with WPA security will connect or not using Multi VLAN's + pytest -m "multi_vlan and wpa and fiveg and ow_sanity_lf" + """ + profile_data = {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 125} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "fiveg" + vlan = [125] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.multi_vlan + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2157", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2157") + @allure.title("Test VLAN with WPA2 Personal Security Mode") + def test_multi_vlan_wpa2_personal_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify that a client operating with WPA2(personal) security will connect or not using Multi VLANS + pytest -m "multi_vlan and wpa2_personal and fiveg and ow_sanity_lf" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 200} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + vlan = [200] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @pytest.mark.multi_vlan + @allure.testcase(name="WIFI-2167", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2167") + @allure.title("Test VLAN with WPA-WPA2 Persoanl Security ") + def test_multi_vlan_wpa_wpa2_personal_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + Multi VLAN Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "multi_vlan_tests and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 150} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_sec = ["wpa2"] + mode = "VLAN" + band = "fiveg" + vlan = [150] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_sec, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.disable_vlan_fiveg # wifi-2174 + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2174", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2174") + @allure.title("Test Disabled VLAN with WPA2 Security Mode") + def test_disable_vlan_wpa2_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify that a client operating with WPA2 security will connect or not by disabling the VLAN + pytest -m "disable_vlan_fiveg and wpa2_personal and fiveg and ow_sanity_lf" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 200} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + vlan = [250] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "FAIL", result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_twog.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_twog.py new file mode 100644 index 000000000..fbc4d4678 --- /dev/null +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/multi_vlan/test_multi_vlan_twog.py @@ -0,0 +1,178 @@ +""" + Create VLAN ,connect stations and flow traffic through it : vlan Mode + pytest -m multi_vlan_tests +""" + +import allure +import pytest + +pytestmark = [pytest.mark.ow_regression_lf, + pytest.mark.multi_vlan_tests, + pytest.mark.twog] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}], + + "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 125}], + + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 200}], + + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 150}], + }, + "rf": {}, + "radius": False +} + + +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@allure.feature("Multi VLAN Test") +@allure.parent_suite("Multi VLAN Test") +@allure.suite("VLAN Mode") +@allure.sub_suite("2.4 Ghz") +@pytest.mark.usefixtures("setup_configuration") +class TestMultiVlan(object): + + @pytest.mark.open + @pytest.mark.twog + @pytest.mark.multi_vlan + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2160", name="WIFI-2160") + @allure.title("Test VLAN with Open Security Mode") + def test_multi_vlan_open_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + To verify that a client operating with open security will connect or not using multi vlans. + pytest -m "open and multi_vlan and twog" + """ + profile_data = {"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100} + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "twog" + vlan = [100] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.twog + @pytest.mark.multi_vlan + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2168", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2168") + @allure.title("Test VLAN with WPA Security Mode") + def test_multi_vlan_wpa_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + Multi VLAN Test with wpa encryption 2.4 GHz Band + pytest -m "multi_vlan_tests and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 125} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "twog" + vlan = [125] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.multi_vlan + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2156", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2156") + @allure.title("Test VLAN with WPA2 Personal Security Mode") + def test_multi_vlan_wpa2_personal_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + Multi VLAN Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "multi_vlan_tests and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 200} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + vlan = [200] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @pytest.mark.multi_vlan + @allure.testcase(name="WIFI-2166", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2166") + @allure.title("Test VLAN with WPA-WPA2 Persoanl Security ") + def test_multi_vlan_wpa_wpa2_personal_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + To verify that a client operating with wpa mixed(personal) security will connect or not using multi vlans. + pytest -m "multi_vlan_tests and wpa_wpa2_personal_mixed and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 150} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_sec = ["wpa2"] + mode = "VLAN" + band = "twog" + vlan = [150] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_sec, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.disable_vlan_twog # wifi-2172 + @pytest.mark.ow_sanity_lf + @allure.testcase(name="WIFI-2172", + url="https://telecominfraproject.atlassian.net/browse/WIFI-2172") + @allure.title("Test Disabled VLAN with WPA2 Security Mode") + def test_disable_vlan_wpa2_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, check_connectivity): + """ + To verify that a client operating with wpa2(personal) security will connect or not by disabling VLAN. + Unique marker:pytest -m "disable_vlan_twog and twog and wpa2_personal and ow_sanity_lf" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 200} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + vlan = [250] + + passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=1, vlan_id=vlan) + assert passes == "FAIL", result diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py index bfa3cfc5f..bff22a5b8 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py @@ -1,11 +1,11 @@ """ -Rate LImiting Vlan Mode Scenario +Rate LImiting VLAN Mode Scenario """ import allure import pytest -pytestmark = [pytest.mark.ow_regression_lf, pytest.mark.vlan] +pytestmark = [pytest.mark.vlan, pytest.mark.rate_limiting_tests] setup_params_general = { "mode": "VLAN", @@ -16,8 +16,8 @@ setup_params_general = { "security_key": "something", "vlan": 100, "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }, {"ssid_name": "ssid_wpa2_5g_br", @@ -25,8 +25,8 @@ setup_params_general = { "security_key": "something", "vlan": 100, "rate-limit": { - "ingress-rate": 100, - "egress-rate": 100 + "ingress-rate": 10, + "egress-rate": 5 } }]}, "rf": {}, @@ -34,594 +34,760 @@ setup_params_general = { } -@allure.feature("Vlan Mode Rate Limiting") +@allure.feature("Rate Limiting Tests") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite("VLAN Mode") +@allure.sub_suite("WPA2 Personal Security") @pytest.mark.parametrize( - 'setup_profiles', + 'setup_configuration', [setup_params_general], indirect=True, scope="class" ) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingVlan(object): +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingVLAN(object): @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up and batch_size_125" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and upload and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_125", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_125 - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and dw and batch_size_125" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and download and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up_dw - @pytest.mark.batch_size_125 + @pytest.mark.upload_download @pytest.mark.ow_sanity_lf - @pytest.mark.ow_rate_limiting_tests_lf - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.batch_size_125 + @pytest.mark.rate_limiting_tests + @allure.testcase(name="WIFI-10693", + url="https://telecominfraproject.atlassian.net/browse/WIFI-10693") + @allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + check_connectivity): """ - Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up_dw and batch_size_125" + To verfiy a client operating with WPA2 Personal security can limit the UP & DW traffic or not. + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and upload_download and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_125", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.disable_up_dw - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_vlan_ssid_disable_up_dw_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and disable_up_dw" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and disable_up_dw" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_dis", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw_di", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_vlan_ssid_up_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload and Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up_dw_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and up_dw_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_per_client", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) - - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, vlan_id=vlan, passkey=passkey, + up_rate=up_rate, down_rate=down_rate) assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.up_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_vlan_ssid_up_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Upload per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and up_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_per_cl", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_per_cl", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, vlan_id=vlan, + passkey=passkey, up_rate=up_rate, + down_rate=down_rate + ) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog @pytest.mark.dw_per_client - @pytest.mark.ow_rate_limiting_tests_lf - def test_wpa2_personal_vlan_ssid_dw_per_client_batch_size_125_2g(self, lf_test, lf_tools): + @pytest.mark.rate_limiting_tests + @allure.title("Test for Download per client batch size 1,2,5 2.4 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and dw_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and dw_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + }} ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_dw_per_cl", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 5}, raw_lines=raw_lines, vlan_id=vlan, + passkey=passkey, up_rate=up_rate, + down_rate=down_rate + ) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up and batch_size_125" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and upload and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_125_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_125", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_125 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and dw and batch_size_125" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and download and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_125_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_125 @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up_dw and batch_size_125" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and upload_download and batch_size_125" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_125_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw_125", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and upload and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_1", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and dw and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and download and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.twog - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_dw_batch_size_1_2g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 2.4 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_2g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and twog and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and upload_download and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + profile_data = {"ssid_name": "ssid_wpa2_2g_br", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_tcp_dl_up_dw_1", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"2G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up + @pytest.mark.upload @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and upload and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_1_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_1_5g", mode=mode, + download_rate="0Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.dw + @pytest.mark.download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and dw and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and download and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg - @pytest.mark.up_dw + @pytest.mark.upload_download @pytest.mark.batch_size_1 - @allure.story('Rate Limiting Open SSID 2.4 GHZ Band') - def test_wpa2_personal_vlan_ssid_up_dw_batch_size_1_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download batch size 1 5 GHz") + def test_wpa2_personal_ssid_up_dw_batch_size_1_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up_dw and batch_size_1" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and upload_download and batch_size_1" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_1_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw_1_5g", mode=mode, + download_rate="1Gbps", batch_size="1", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 1}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.disable_up_dw - def test_wpa2_personal_vlan_ssid_disable_up_dw_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for ssid disable Upload and Download batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_disable_up_dw_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and disable_up_dw" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and disable_up_dw" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] profile_data["rate-limit"][0] = 0 profile_data["rate-limit"][1] = 0 mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_di_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000") + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_dw_di_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, vlan_id=vlan, passkey=passkey, up_rate=up_rate, + down_rate=down_rate) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_dw_per_client - def test_wpa2_personal_vlan_ssid_up_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload and Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up_dw_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and up_dw_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["dl_rate_sel: Per-Station Download Rate:"], ["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_dw_per_cl", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, vlan_id=vlan, + passkey=passkey, up_rate=up_rate, + down_rate=down_rate + ) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.up_per_client - def test_wpa2_personal_vlan_ssid_up_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Upload per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_up_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and up_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and up_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["ul_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_up_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="0Gbps", batch_size="1,2,5", - upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_up_per_cl_5g", mode=mode, + download_rate="0Gbps", batch_size="1,2,5", + upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, vlan_id=vlan, + passkey=passkey, up_rate=up_rate, + down_rate=down_rate + ) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True @pytest.mark.wpa2_personal @pytest.mark.fiveg @pytest.mark.dw_per_client - def test_wpa2_personal_vlan_ssid_dw_per_client_batch_size_125_5g(self, lf_test, lf_tools): + @allure.title("Test for Download per client batch size 1,2,5 5 GHz") + def test_wpa2_personal_ssid_dw_per_client_batch_size_125_5g(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, + setup_configuration): """ Test Rate Limiting Scenario - pytest -m "rate_limiting and vlan and wpa2_personal and fiveg and dw_per_client" + pytest -m "rate_limiting_tests and vlan and wpa2_personal and fiveg and dw_per_client" """ # run wifi capacity test here - #lf_tools.reset_scenario() - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + profile_data = {"ssid_name": "ssid_wpa2_5g_br", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 10, + "egress-rate": 5 + } + } ssid_name = profile_data["ssid_name"] mode = "VLAN" - vlan = 100 + passkey = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + vlan = [100] raw_lines = [["dw_rate_sel: Per-Station Download Rate:"]] allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"])) - lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name) - lf_tools.Chamber_View() - wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_vlan_dw_per_cl_5g", mode=mode, vlan_id=vlan, - download_rate="1Gbps", batch_size="1,2,5", - upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", raw_lines=raw_lines) + get_test_library.rate_limiting_test(instance_name="test_client_wpa2_VLAN_dw_per_cl_5g", mode=mode, + download_rate="1Gbps", batch_size="1,2,5", + upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000", + move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name, + num_stations={"5G": 5}, raw_lines=raw_lines, vlan_id=vlan, + passkey=passkey, up_rate=up_rate, + down_rate=down_rate + ) - report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - - lf_tools.attach_report_graphs(report_name=report_name) - print("Test Completed... Cleaning up Stations") assert True diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/twog_radio/test_vlan_twog.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/twog_radio/test_vlan_twog.py deleted file mode 100644 index f8f8a50b8..000000000 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/twog_radio/test_vlan_twog.py +++ /dev/null @@ -1,371 +0,0 @@ -""" - Create VLAN ,connect stations and flow traffic through it : vlan Mode - pytest -m test_vlan_config_2g_radio -""" - -import time -import allure -import pytest - - -pytestmark = [pytest.mark.ow_regression_lf, - pytest.mark.ow_multi_vlan_tests_lf, - pytest.mark.twog] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}], - - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 125}], - - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 200}], - - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", - "vlan": 150}], - }, - "rf": {}, - "radius": False -} - - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanConfigTwogRadio(object): - - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.valid_client_ip_twog_wpa - @allure.testcase(name="test_station_ip_wpa_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2168") - def test_station_ip_wpa_ssid_2g(self, lf_test, lf_tools, - station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa, twog - pytest -m valid_client_ip_twog_wpa - """ - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa" - mode = "VLAN" - band = "twog" - vlan = 125 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_twog) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list(map(lambda y : int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.')+1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None - ,lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - # vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.valid_client_ip_twog_wpa2 # wifi-2156 - @allure.testcase(name="test_station_ip_wpa2_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2156") - def test_station_ip_wpa2_ssid_2g(self, lf_test, lf_tools, - station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa2, twog - pytest -m valid_client_ip_twog_wpa2 - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "twog" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.disable_vlan_twog # wifi-2158 - @allure.testcase(name="test_disable_vlan_wpa2_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2158") - def test_disable_vlan_wpa2_ssid_2g(self, lf_test, lf_tools, - station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa2, twog - pytest -m disable_vlan_twog - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "twog" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - - vlan_alias = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["alias"] - - req_url = "cli-json/set_port" - lf_tools.json_post(req_url, port_resources[0], port_resources[1], vlan_alias, 1, 8388608) - down = False - count = 0 - while not down: - down = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["down"] - time.sleep(1) - count += 1 - if count == 30: - break - - passes = 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 not passes: - sta_info = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - station_names_twog[0])["interface"] - lf_test.allure_report_table_format(dict_data=sta_info, key="Interface", value="Value", name=station_names_twog[0]) - station_ip = sta_info["ip"] - print("station did not get an IP. Test passed") - print("station ip: ", station_ip) - assert True - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass - - @pytest.mark.open - @pytest.mark.twog - @pytest.mark.valid_client_ip_twog_open - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_station_ip_open_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2160") - def test_station_ip_open_ssid_2g(self, lf_test, lf_tools, - station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, open, twog - pytest -m valid_client_ip_twog_open - """ - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssid_name = profile_data["ssid_name"] - security_key = "[BLANK]" - security = "open" - mode = "VLAN" - band = "twog" - vlan = 100 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_twog) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list(map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass - - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.twog - @pytest.mark.test_station_ip_twog_wpa_wpa2 - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_station_ip_wpa_wpa2_personal_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2166") - def test_station_ip_wpa_wpa2_personal_ssid_2g(self, lf_test, - lf_tools, station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa, wpa2, twog - pytest -m test_station_ip_twog_wpa_wpa2 - """ - profile_data = setup_params_general["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa" - extra_secu = ["wpa2"] - mode = "VLAN" - band = "twog" - vlan = 150 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_twog) - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.enable_vlan_twog # wifi-2172 - @pytest.mark.ow_sanity_lf - @allure.testcase(name="test_station_ip_wpa2_personal_ssid_2g", - url="https://telecominfraproject.atlassian.net/browse/WIFI-2172") - def test_enable_vlan_wpa2_ssid_2g(self, lf_test, lf_tools, - station_names_twog, - test_cases, get_configuration, get_ap_logs, get_lf_logs): - """ - Client connectivity using vlan, wpa2, twog - pytest -m enable_vlan_twog - """ - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssid_name = profile_data["ssid_name"] - security_key = profile_data["security_key"] - security = "wpa2" - mode = "VLAN" - band = "twog" - vlan = 200 - lanforge_data = get_configuration["traffic_generator"]["details"] - upstream_port = lanforge_data["upstream"] - port_resources = upstream_port.split(".") - lf_test.Client_disconnect(station_names_twog) - vlan_alias = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["alias"] - lf_tools.json_post("cli-json/set_port", port_resources[0], port_resources[1], vlan_alias, 0, 8388610) - - passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, - passkey=security_key, mode=mode, band=band, - station_name=station_names_twog, vlan_id=vlan) - if result: - vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" + - port_resources[2] + "." + str(vlan))["interface"]["ip"] - vlan_list = list( - map(lambda y: int(list(y.values())[0]['alias'][list(y.values())[0]['alias'].find('.') + 1:]), - list(filter(lambda x: x if list(x.values())[0]['port type'].endswith('VLAN') else None, - lf_tools.json_get("/port/?fields=port+type,alias")['interfaces'])))) - station_ip = lf_test.station_ip - station_ip = station_ip.split(".") - vlan_ip = vlan_ip.split(".") - - print(station_ip[:2], vlan_ip[:2]) - for i, j in zip(station_ip[:2], vlan_ip[:2]): - if i != j: - assert False - - vlan_list = [int(i) for i in vlan_list] - if int(vlan) in vlan_list: - print("station got IP as per VLAN. Test passed") - assert True - else: - assert False - else: - assert False - try: - lf_test.Client_disconnect(station_names_twog) - except: - pass diff --git a/tests/e2e/conftest.1 b/tests/e2e/conftest.1 new file mode 100644 index 000000000..540202a3d --- /dev/null +++ b/tests/e2e/conftest.1 @@ -0,0 +1,1014 @@ +""" + Pytest fixtures: High level Resource Management and base setup fixtures +""" +import datetime +import os +import random +import string +import sys +import re + +import allure + +ALLURE_ENVIRONMENT_PROPERTIES_FILE = 'environment.properties' +ALLUREDIR_OPTION = '--alluredir' + +sys.path.append( + os.path.dirname( + os.path.realpath(__file__) + ) +) +if "libs" not in sys.path: + sys.path.append(f'../libs') +for folder in 'py-json', 'py-scripts': + if folder not in sys.path: + sys.path.append(f'../lanforge/lanforge-scripts/{folder}') + +sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") + +sys.path.append(f'../libs') +sys.path.append(f'../libs/lanforge/') + +from LANforge.LFUtils import * + +if 'py-json' not in sys.path: + sys.path.append('../py-scripts') +from apnos.apnos import APNOS +from controller.controller_1x.controller import FirmwareUtility +import pytest +from lanforge.lf_tests import RunTest +from cv_test_manager import cv_test +from configuration import CONFIGURATION +from configuration import PERFECTO_DETAILS +from configuration import open_flow +from configuration import RADIUS_SERVER_DATA +from configuration import RADIUS_ACCOUNTING_DATA +from configuration import RATE_LIMITING_RADIUS_SERVER_DATA +from configuration import RATE_LIMITING_RADIUS_ACCOUNTING_DATA +from lanforge.scp_util import SCP_File +from testrails.testrail_api import APIClient +from testrails.reporting import Reporting +from lf_tools import ChamberView +from libs.lanforge.pull_report import Report +from os import path +from typing import Any, Callable, Optional + +from _pytest.fixtures import SubRequest +from pytest import fixture + +from fixtures_1x import Fixtures_1x +from fixtures_2x import Fixtures_2x +from fixtures_3x import Fixtures_3x +from controller.controller_3x.controller import CController + +import logging + +LOGGER = logging.getLogger(__name__) + + +def pytest_addoption(parser): + """pytest addoption function: contains ini objects and options""" + parser.addini("tr_url", "Test Rail URL") + parser.addini("tr_prefix", "Test Rail Prefix (Generally Testbed_name_)") + parser.addini("tr_user", "Testrail Username") + parser.addini("tr_pass", "Testrail Password") + parser.addini("tr_project_id", "Testrail Project ID") + parser.addini("milestone", "milestone Id") + + parser.addini("influx_host", "Influx Host", default="influx.cicd.lab.wlan.tip.build") + parser.addini("influx_port", "Influx Port", default=80) + parser.addini("influx_token", "Influx Token", default="TCkdATXAbHmNbn4QyNaj43WpGBYxFrzV") + parser.addini("influx_bucket", "influx bucket", default="tip-cicd") + parser.addini("influx_org", "influx organization", default="tip") + parser.addini(name="firmware", type='string', help="AP Firmware build URL", default="0") + parser.addini("cloud_ctlr", "AP Firmware build URL", default="0") + + parser.addini("num_stations", "Number of Stations/Clients for testing") + + # change behaviour + parser.addoption( + "--skip-upgrade", + action="store_true", + default=False, + help="skip updating firmware on the AP (useful for local testing)" + ) + parser.addoption( + "--skip-env", + action="store_true", + default=False, + help="skip adding to env data" + ) + + parser.addoption( + "--skip-lanforge", + action="store_true", + default=False, + help="skip to do any interactions on lanforge (to be used in case of interop)" + ) + + # change behaviour + parser.addoption( + "--exit-on-fail", + action="store_true", + default=False, + help="skip updating firmware on the AP (useful for local testing)" + ) + + # change to Ucentral Ctlr + parser.addoption( + "--1.x", + action="store_true", + default=False, + help="Option to run Test Cases on 1.x SDK" + ) + + # change behaviour + parser.addoption( + "--force-upgrade", + action="store_true", + default=False, + help="force Upgrading Firmware even if it is already latest version" + ) + parser.addoption( + "--force-upload", + action="store_true", + default=False, + help="force Uploading Firmware even if it is already latest version" + ) + # this has to be the last argument + # example: --access-points ECW5410 EA8300-EU + parser.addoption( + "--testbed", + # nargs="+", + default="basic-01", + help="AP Model which is needed to test" + ) + parser.addoption( + "--use-testrail", + action="store_false", + default=True, + help="Stop using Testrails" + ) + parser.addoption( + "--run-lf", + action="store_true", + default=False, + help="skip cloud controller and AP, run only lanforge tests on a ssid preconfigured" + ) + parser.addoption( + "--cc.1", + action="store_true", + default=False, + help="Option to run Test Cases on cc version 1" + + ) + parser.addoption( + "--roaming_delay", + default=1, + help="Roaming delay interval" + ) + parser.addoption( + "--iteration", + default=1, + help="Roaming iterations" + ) + parser.addoption( + "--duration", + default=1, + help="Roaming duration in minutes" + ) + parser.addoption( + "--client", + default=1, + help="Number of clients to be created" + ) + parser.addoption( + "--skip-pcap", + action="store_true", + default=False, + help="skip packet capture for sanity" + ) + parser.addoption( + "--device", + default="iPhone-11", + help="Device Model which is needed to test" + ) + + # Perfecto Parameters + parser.addini("perfectoURL", "Cloud URL") + parser.addini("securityToken", "Security Token") + parser.addini("platformName-iOS", "iOS Platform") + parser.addini("platformName-android", "Android Platform") + parser.addini("model-iOS", "iOS Devices") + parser.addini("model-android", "Android Devices") + parser.addini("bundleId-iOS", "iOS Devices") + parser.addini("bundleId-iOS-Settings", "iOS Settings App") + parser.addini("appPackage-android", "Android Devices") + parser.addini("bundleId-iOS-Safari", "Safari BundleID") + parser.addini("wifi-SSID-2g-Pwd", "Wifi 2g Password") + parser.addini("Default-SSID-5gl-perfecto-b", "Wifi 5g AP Name") + parser.addini("Default-SSID-2g-perfecto-b", "Wifi 2g AP Name") + parser.addini("Default-SSID-perfecto-b", "Wifi AP Name") + parser.addini("bundleId-iOS-Ping", "Ping Bundle ID") + parser.addini("browserType-iOS", "Mobile Browser Name") + parser.addini("projectName", "Project Name") + parser.addini("projectVersion", "Project Version") + parser.addini("jobName", "CI Job Name") + parser.addini("jobNumber", "CI Job Number") + parser.addini("reportTags", "Report Tags") + parser.addoption( + "--access-points-perfecto", + # nargs="+", + default=["Perfecto"], + help="list of access points to test" + ) + + +""" +Test session base fixture +""" + +@pytest.fixture(scope="session") +def testbed(request): + """yields the testbed option selection""" + var = request.config.getoption("--testbed") + allure.attach(name="testbed name", body=var) + yield var + + +@pytest.fixture(scope="session") +def device(request): + """yields the device option selection""" + var = request.config.getoption("--device") + yield var + + +@pytest.fixture(scope="session") +def should_upload_firmware(request): + """yields the --force-upload option for firmware upload selection""" + yield request.config.getoption("--force-upload") + + +@pytest.fixture(scope="session") +def run_lf(request): + """yields the --run-lf option for skipping configuration on AP and using Cloud controller""" + var = request.config.getoption("--run-lf") + yield var + + +@pytest.fixture(scope="session") +def cc_1(request): + """yields the --cc.1 option for skipping configuration on AP and using Cloud controller of available framework""" + var = request.config.getoption("--cc.1") + yield var + + +@pytest.fixture(scope="session") +def roaming_delay(request): + """yields the --roaming_delay option """ + var = request.config.getoption("--roaming_delay") + allure.attach(name="roaming delay provided in seconds", body=str(var)) + yield var + + +@pytest.fixture(scope="session") +def iteration(request): + """yields the --iteration option for a test to provide how frequenty roam should happen """ + var = request.config.getoption("--iteration") + allure.attach(name="iteration", body=var) + yield var + + +@pytest.fixture(scope="session") +def duration(request): + """yields the --duration option for a test to provide how long roam should happen """ + var = request.config.getoption("--duration") + allure.attach(name="duration in minutes", body=str(var)) + yield var + + +@pytest.fixture(scope="session") +def client(request): + """yields the --client option for getting user specified client number""" + var = request.config.getoption("--client") + allure.attach(name="number of clients", body=var) + yield var + + +@pytest.fixture(scope="session") +def skip_pcap(request): + """yields the --skip-pcap option for skipping the packet capture for sanity""" + var = request.config.getoption("--skip-pcap") + yield var + + +@pytest.fixture(scope="session") +def should_upgrade_firmware(request): + """yields the --force-upgrade option for firmware upgrade selection""" + yield request.config.getoption("--force-upgrade") + + +@pytest.fixture(scope="session") +def exit_on_fail(request): + """yields the --exit-on-fail option for exiting the test case if it fails without teardown""" + yield request.config.getoption("--exit-on-fail") + + +@pytest.fixture(scope="session") +def radius_info(): + """yields the radius server information from lab info file""" + yield RADIUS_SERVER_DATA + + +@pytest.fixture(scope="session") +def radius_accounting_info(): + """yields the radius accounting information from lab info file""" + yield RADIUS_ACCOUNTING_DATA + + +@pytest.fixture(scope="session") +def rate_radius_info(): + """yields the radius server information from lab info file""" + yield RATE_LIMITING_RADIUS_SERVER_DATA + + +@pytest.fixture(scope="session") +def rate_radius_accounting_info(): + """yields the radius accounting information from lab info file""" + yield RATE_LIMITING_RADIUS_ACCOUNTING_DATA + + +@pytest.fixture(scope="session") +def get_configuration(testbed, request): + """yields the selected testbed information from lab info file (configuration.py)""" + if request.config.getini("cloud_ctlr") != "0": + CONFIGURATION[testbed]["controller"]["url"] = request.config.getini("cloud_ctlr") + if request.config.getini("firmware") != "0": + version = request.config.getini("firmware") + version_list = version.split(",") + for i in range(len(CONFIGURATION[testbed]["access_point"])): + CONFIGURATION[testbed]["access_point"][i]["version"] = version_list[0] + LOGGER.info("Selected the lab Info data: " + str((CONFIGURATION[testbed]))) + yield CONFIGURATION[testbed] + + +@pytest.fixture(scope="session") +def get_device_configuration(device, request): + """yields the selected device information from lab info file (configuration.py)""" + + LOGGER.info("Selected the lab Info data: " + str((PERFECTO_DETAILS[device]))) + print(PERFECTO_DETAILS[device]) + yield PERFECTO_DETAILS[device] + + +@pytest.fixture(scope="session") +def get_equipment_ref(request, setup_controller, testbed, get_configuration): + """""" + if request.config.getoption("1.x"): + equipment_id_list = [] + for i in get_configuration['access_point']: + equipment_id_list.append(setup_controller.get_equipment_id( + serial_number=i['serial'])) + else: + equipment_id_list = [] + for i in get_configuration['access_point']: + equipment_id_list.append(i['serial']) + yield equipment_id_list + + +@pytest.fixture(scope="session") +def get_sdk_version(fixtures_ver, run_lf, cc_1): + version = "" + if not run_lf and not cc_1: + version = fixtures_ver.get_sdk_version() + print(version) + yield version + + +@pytest.fixture(scope="session") +def get_uci_show(fixtures_ver, get_apnos, get_configuration): + uci_show = fixtures_ver.get_uci_show(get_apnos, get_configuration) + yield uci_show + + +@pytest.fixture(scope="session") +def get_ap_version(fixtures_ver, get_apnos, get_configuration, cc_1): + if not cc_1: + ap_version = fixtures_ver.get_ap_version(get_apnos, get_configuration) + yield ap_version + else: + yield True + + +@pytest.fixture(scope="session") +def skip_lf(request): + yield request.config.getoption("--skip-lanforge") + + +@pytest.fixture(scope="session") +def get_openflow(): + yield open_flow + + +# Controller Fixture +@pytest.fixture(scope="session") +def setup_controller(request, get_configuration, add_env_properties, fixtures_ver): + """sets up the controller connection and yields the sdk_client object""" + sdk_client = fixtures_ver.controller_obj + if not cc_1: + request.addfinalizer(fixtures_ver.disconnect) + yield sdk_client + + +# Prov Controller Fixture +@pytest.fixture(scope="session") +def setup_prov_controller(request, get_configuration, add_env_properties, fixtures_ver): + """sets up the prov controller connection and yields the sdk_client object""" + sdk_client = fixtures_ver.prov_controller_obj + request.addfinalizer(fixtures_ver.disconnect) + yield sdk_client + + +@pytest.fixture(scope="session") +def setup_firmware(setup_controller): + """ Fixture to Setup Firmware with the selected sdk """ + setup_controller.instantiate_firmware() + yield True + + +@pytest.fixture(scope="session") +def instantiate_firmware(request, setup_controller, get_configuration): + """sets up firmware utility and yields the object for firmware upgrade""" + if request.config.getoption("--1.x"): + firmware_client_obj = [] + + for access_point_info in get_configuration['access_point']: + version = access_point_info["version"] + if request.config.getini("build").__contains__("https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/"): + version = request.config.getini("build") + firmware_client = FirmwareUtility(sdk_client=setup_controller, + model=access_point_info["model"], + version_url=version) + firmware_client_obj.append(firmware_client) + yield firmware_client_obj + else: + # 2.x + pass + + +@pytest.fixture(scope="session") +def get_latest_firmware(request, instantiate_firmware): + """yields the list of firmware version""" + if request.config.getoption("--1.x"): + fw_version_list = [] + try: + + for fw_obj in instantiate_firmware: + latest_firmware = fw_obj.get_fw_version() + latest_firmware = latest_firmware.replace(".tar.gz", "") + fw_version_list.append(latest_firmware) + except Exception as e: + print(e) + fw_version_list = [] + + yield fw_version_list + else: + # 2.x + pass + + +@pytest.fixture(scope="session") +def upload_firmware(request, should_upload_firmware, instantiate_firmware): + """yields the firmware_id that is uploaded to cloud""" + if request.config.getoption("--1.x"): + firmware_id_list = [] + for i in range(0, len(instantiate_firmware)): + firmware_id = instantiate_firmware[i].upload_fw_on_cloud(force_upload=should_upload_firmware) + firmware_id_list.append(firmware_id) + yield firmware_id_list + else: + # 2.x release + yield True + + +@pytest.fixture(scope="session") +def upgrade_firmware(request, instantiate_firmware, get_equipment_ref, check_ap_firmware_cloud, get_latest_firmware, + should_upgrade_firmware, should_upload_firmware, get_apnos, get_configuration): + """yields the status of upgrade of firmware. waits for 300 sec after each upgrade request""" + print(should_upgrade_firmware, should_upload_firmware) + if request.config.getoption("--1.x"): + status_list = [] + active_fw_list = [] + try: + for access_point in get_configuration['access_point']: + ap_ssh = get_apnos(access_point, sdk="1.x") + active_fw = ap_ssh.get_active_firmware() + active_fw_list.append(active_fw) + except Exception as e: + print(e) + active_fw_list = [] + print(active_fw_list, get_latest_firmware) + if get_latest_firmware != active_fw_list: + if request.config.getoption("--skip-upgrade"): + status = "skip-upgrade" + status_list.append(status) + else: + + for i in range(0, len(instantiate_firmware)): + status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_ref[i], force_upload=True, + force_upgrade=should_upgrade_firmware) + status_list.append(status) + else: + if should_upgrade_firmware: + for i in range(0, len(instantiate_firmware)): + status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_ref[i], + force_upload=should_upload_firmware, + force_upgrade=should_upgrade_firmware) + status_list.append(status) + else: + status = "skip-upgrade Version Already Available" + status_list.append(status) + yield status_list + else: + # 2.x release + pass + + +@pytest.fixture(scope="session") +def check_ap_firmware_cloud(request, setup_controller, get_equipment_ref): + """yields the active version of firmware on cloud""" + if request.config.getoption("--1.x"): + ap_fw_list = [] + for i in get_equipment_ref: + ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i)) + yield ap_fw_list + else: + # 2.x + pass + + +@pytest.fixture(scope="session") +def check_ap_firmware_ssh(get_configuration, request): + """yields the active version of firmware on ap""" + if request.config.getoption("--1.x"): + active_fw_list = [] + try: + for access_point in get_configuration['access_point']: + ap_ssh = APNOS(access_point) + active_fw = ap_ssh.get_active_firmware() + active_fw_list.append(active_fw) + except Exception as e: + print(e) + active_fw_list = [] + yield active_fw_list + else: + # 2.x + pass + + +@pytest.fixture(scope="session") +def setup_test_run(setup_controller, request, upgrade_firmware, get_configuration, + get_equipment_ref, get_latest_firmware, + get_apnos): + """used to upgrade the firmware on AP and should be called on each test case on a module level""" + if request.config.getoption("--1.x"): + active_fw_list = [] + try: + for access_point in get_configuration['access_point']: + ap_ssh = get_apnos(access_point, sdk="1.x") + active_fw = ap_ssh.get_active_firmware() + active_fw_list.append(active_fw) + except Exception as e: + print(e) + active_fw_list = [] + print(active_fw_list, get_latest_firmware) + if active_fw_list == get_latest_firmware: + yield True + else: + pytest.exit("AP is not Upgraded tp Target Firmware versions") + else: + # 2.x + pass + + +""" +Instantiate Reporting +""" + + +@pytest.fixture(scope="session") +def update_report(request, testbed, get_configuration): + """used to update the test report on testrail/allure""" + if request.config.getoption("--use-testrail"): + tr_client = Reporting() + else: + tr_client = APIClient(request.config.getini("tr_url"), request.config.getini("tr_user"), + request.config.getini("tr_pass"), request.config.getini("tr_project_id")) + if request.config.getoption("--use-testrail"): + tr_client.rid = "skip testrails" + else: + projId = tr_client.get_project_id(project_name=request.config.getini("tr_project_id")) + test_run_name = request.config.getini("tr_prefix") + testbed + "_" + str( + datetime.date.today()) + "_" + get_configuration['access_point'][0]['version'] + tr_client.create_testrun(name=test_run_name, case_ids=list(TEST_CASES.values()), project_id=projId, + milestone_id=request.config.getini("milestone"), + description="Automated Nightly Sanity test run for new firmware build") + rid = tr_client.get_run_id(test_run_name=test_run_name) + tr_client.rid = rid + yield tr_client + + +""" +FRAMEWORK MARKER LOGIC +""" + + +@pytest.fixture(scope="session") +def get_security_flags(): + """used to get the essential markers on security and band""" + # Add more classifications as we go + security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", + "wpa_wpa2_enterprise_mixed", "wpa2_eap", "wpa2_only_eap", + "wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed", + "wpa3_enterprise", "twog", "fiveg", "radius"] + yield security + + +@pytest.fixture(scope="session") +def get_markers(request, get_security_flags): + """used to get the markers on the selected test case class, used in setup_configuration""" + session = request.node + markers = list() + security = get_security_flags + security_dict = dict().fromkeys(security) + for item in session.items: + for j in item.iter_markers(): + markers.append(j.name) + for i in security: + if set(markers).__contains__(i): + security_dict[i] = True + else: + security_dict[i] = False + + yield security_dict + + +@pytest.fixture(scope="session") +def test_access_point(fixtures_ver, request, get_configuration, get_apnos): + """used to check the manager status of AP, should be used as a setup to verify if ap can reach cloud""" + status = fixtures_ver.get_ap_cloud_connectivity_status(get_configuration, get_apnos) + + def teardown_session(): + data = [] + data.append(False) + for s in status: + data.append(s[0]) + print(data) + if False not in data: + pytest.exit("AP is Not connected to ucentral gw") + allure.attach(name=str(status), body="") + + request.addfinalizer(teardown_session) + yield status + + +@pytest.fixture(scope="session") +def test_ap_connection_status(fixtures_ver, request, get_configuration, get_apnos): + """used to check the manager status of AP, should be used as a setup to verify if ap can reach cloud""" + connection, redirector_value = fixtures_ver.get_ap_status_logs(get_configuration, get_apnos) + yield connection, redirector_value + + +@pytest.fixture(scope="session") +def traffic_generator_connectivity(testbed, get_configuration): + """Verify if traffic generator is reachable""" + if get_configuration['traffic_generator']['name'] == "lanforge": + lanforge_ip = get_configuration['traffic_generator']['details']['ip'] + lanforge_port = get_configuration['traffic_generator']['details']['port'] + # Condition : + # if gui connection is not available + # yield False + # Condition : + # If Gui Connection is available + # yield the gui version + try: + cv = cv_test(lanforge_ip, lanforge_port) + url_data = cv.get_ports("/") + lanforge_GUI_version = url_data["VersionInfo"]["BuildVersion"] + lanforge_gui_git_version = url_data["VersionInfo"]["GitVersion"] + lanforge_gui_build_date = url_data["VersionInfo"]["BuildDate"] + print(lanforge_GUI_version, lanforge_gui_build_date, lanforge_gui_git_version) + if not (lanforge_GUI_version or lanforge_gui_build_date or lanforge_gui_git_version): + yield False + else: + yield lanforge_GUI_version + except: + yield False + else: + yield True + + +@pytest.fixture(scope="session") +def create_lanforge_chamberview_dut(lf_tools, skip_lf, run_lf): + dut_name = "" + if (not run_lf) and (not skip_lf): + dut_object, dut_name = lf_tools.Create_Dut() + return dut_name + + +@pytest.fixture(scope="session") +def lf_tools(get_configuration, testbed, skip_lf, run_lf, get_ap_version, cc_1): + """ Create a DUT on LANforge""" + if not skip_lf: + obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"], + testbed=testbed, run_lf=run_lf, access_point_data=get_configuration["access_point"], + cc_1=cc_1, ap_version=get_ap_version) + else: + obj = False + yield obj + + +@pytest.fixture(scope="session") +def lf_reports(): + obj = Report() + yield obj + + +@pytest.fixture(scope="session") +def lf_test(get_configuration, setup_influx, request, skip_lf, run_lf, skip_pcap): + if not skip_lf: + if request.config.getoption("--exit-on-fail"): + obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx, + debug=True, run_lf=run_lf, skip_pcap=skip_pcap) + if request.config.getoption("--exit-on-fail") is False: + obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx, + debug=False, run_lf=run_lf, skip_pcap=skip_pcap) + yield obj + + +@pytest.fixture(scope="session") +def setup_influx(request, testbed, get_configuration): + """ Setup Influx Parameters: Used in CV Automation""" + influx_params = { + "influx_host": request.config.getini("influx_host"), + "influx_port": request.config.getini("influx_port"), + "influx_token": request.config.getini("influx_token"), + "influx_bucket": request.config.getini("influx_bucket"), + "influx_org": request.config.getini("influx_org"), + "influx_tag": [testbed, get_configuration["access_point"][0]["model"]], + } + yield influx_params + + +# Need for Perforce Mobile Device Execution +def pytest_sessionstart(session): + session.results = dict() + + +@fixture(scope='session', autouse=True) +def add_allure_environment_property(request: SubRequest) -> Optional[Callable]: + environment_properties = dict() + + def maker(key: str, value: Any): + environment_properties.update({key: value}) + + yield maker + + alluredir = request.config.getoption(ALLUREDIR_OPTION) + + if not alluredir or not os.path.isdir(alluredir) or not environment_properties: + return + + allure_env_path = path.join(alluredir, ALLURE_ENVIRONMENT_PROPERTIES_FILE) + + with open(allure_env_path, 'w') as _f: + data = '\n'.join([f'{variable}={value}' for variable, value in environment_properties.items()]) + _f.write(data) + + +@fixture(scope='session') +def add_env_properties(request, get_configuration, get_sdk_version, get_apnos, fixtures_ver, cc_1, + add_allure_environment_property: Callable) -> None: + if request.config.getoption("--skip-env"): + add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) + return + if cc_1: + for i in range(len(get_configuration["access_point"])): + add_allure_environment_property(str('Access-Point-Model' + str(i + 1)), + get_configuration["access_point"][i]["model"]) + else: + add_allure_environment_property('Access-Point-Model', get_configuration["access_point"][0]["model"]) + add_allure_environment_property('SDK-Version', get_sdk_version) + try: + if not cc_1: + add_allure_environment_property('Access-Point-Firmware-Version', + fixtures_ver.get_ap_version(get_apnos, get_configuration)[0].split("\n")[1]) + except Exception as e: + print(e) + pass + if cc_1: + listkey = list(get_configuration["controller"].keys()) + if "version" in listkey: + add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) + add_allure_environment_property('Controller-Version', get_configuration["controller"]["version"]) + for i in range(len(get_configuration["access_point"])): + add_allure_environment_property(str('AP-Name-' + str(i + 1)), + get_configuration["access_point"][i]["ap_name"]) + for i in range(len(get_configuration["access_point"])): + add_allure_environment_property(str('AP-Serial-Number-' + str(i + 1)), + get_configuration["access_point"][i]["serial"]) + add_allure_environment_property('LANforge-Chipset-Info', + get_configuration["traffic_generator"]["details"]["Chip-set-info"]) + else: + pass + else: + add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"]) + add_allure_environment_property('AP-Serial-Number', get_configuration["access_point"][0]["serial"] + "\n") + + +@fixture(scope="session") +def add_firmware_property_after_upgrade(add_allure_environment_property, fixtures_ver, get_apnos, + get_configuration): + # try: + add_allure_environment_property('Access-Point-Firmware-Version', + fixtures_ver.get_ap_version(get_apnos, get_configuration)[0].split("\n")[1]) + # except Exception as e: + # print(e) + # pass + + +@pytest.fixture(scope="session") +def fixtures_ver(request, get_configuration, run_lf, cc_1): + if request.config.getoption("1.x") is False and request.config.getoption("cc.1") is False: + print("2.x") + obj = Fixtures_2x(configuration=get_configuration, run_lf=run_lf) + if request.config.getoption("1.x"): + print("1.x") + obj = Fixtures_1x(configuration=get_configuration) + if request.config.getoption("cc.1"): + print(" fixture version cc.1") + obj = Fixtures_3x(configuration=get_configuration, run_lf=run_lf, cc_1=cc_1) + yield obj + + +@pytest.fixture(scope="session") +def firmware_upgrade(fixtures_ver, get_apnos, get_configuration): + upgrade_status = fixtures_ver.setup_firmware(get_apnos, get_configuration) + yield upgrade_status + + +""" +Logs related Fixtures +""" + + +@pytest.fixture(scope="function") +def get_ap_logs(request, get_apnos, get_configuration, run_lf): + if not run_lf: + 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) + + # Adding memory Profile code before every test start + output = ap_ssh.get_memory_profile() + allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + + 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)) + + # Adding memory Profile code after every test completion + output = ap_ssh.get_memory_profile() + allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) + + request.addfinalizer(collect_logs) + + +@pytest.fixture(scope="function") +def get_lf_logs(request, get_apnos, get_configuration): + ip = get_configuration["traffic_generator"]["details"]["ip"] + port = get_configuration["traffic_generator"]["details"]["ssh_port"] + + def collect_logs_lf(): + log_0 = "/home/lanforge/lanforge_log_0.txt" + log_1 = "/home/lanforge/lanforge_log_1.txt" + obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_0, + local_path=".") + obj.pull_file() + allure.attach.file(source="lanforge_log_0.txt", + name="lanforge_log_0") + obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_1, + local_path=".") + obj.pull_file() + allure.attach.file(source="lanforge_log_1.txt", + name="lanforge_log_1") + + request.addfinalizer(collect_logs_lf) + + +@pytest.fixture(scope="function") +def get_apnos_logs(get_apnos, get_configuration): + all_logs = [] + for ap in get_configuration['access_point']: + ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") + logs = ap_ssh.logread() + all_logs.append(logs) + yield all_logs + + +@pytest.fixture(scope="function") +def get_controller_logs(get_configuration, ): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + summary = obj.show_ap_summary() + print(summary) + allure.attach(name='show ap summary', body=str(summary)) + + +@pytest.fixture(scope="function") +def get_ap_config_slots(get_configuration): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + slot = obj.show_ap_config_slots() + # print(slot) + allure.attach(name="ap_slots", body=str(slot)) + + +@pytest.fixture(scope="session") +def get_apnos_max_clients(get_apnos, get_configuration): + all_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="chmod +x /usr/share/ucentral/wifi_max_user.uc") + a = ap_ssh.run_generic_command(cmd="/usr/share/ucentral/wifi_max_user.uc") + try: + all_logs.append(a[1]) + except Exception as e: + pass + yield all_logs + + +@pytest.fixture(scope="function") +def get_ap_channel(get_apnos, get_configuration): + all_data = [] + dict_band_channel = {} + for ap in get_configuration['access_point']: + ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") + a = ap_ssh.run_generic_command(cmd="iw dev | grep channel") + print("ap command output:- ", a) + try: + a = a[1:] + for i in a: + if i == '': + continue + j = int(re.findall('\d+', i)[0]) + print(j) + if j >= 36: + dict_band_channel["5G"] = j + continue + elif j < 36: + dict_band_channel["2G"] = j + continue + if not "2G" in dict_band_channel: + dict_band_channel["2G"] = "AUTO" + if not "5G" in dict_band_channel: + dict_band_channel["5G"] = "AUTO" + all_data.append(dict_band_channel) + except Exception as e: + print(e) + pass + print(all_data) + yield all_data + + +@pytest.fixture(scope="function") +def disable_band5ghz(get_configuration): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + shut = obj.ap_5ghz_shutdown() + print(shut) + + +@pytest.fixture(scope="function") +def disable_band2ghz(get_configuration): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + shut = obj.ap_2ghz_shutdown() + print(shut) + + +@pytest.fixture(scope="function") +def disable_band6ghz(get_configuration): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + shut = obj.ap_6ghz_shutdown() + print(shut) + + +@pytest.fixture(scope="function") +def enable_all_bands(get_configuration): + obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point']) + obj.no_ap_5ghz_shutdown() + obj.no_ap_2ghz_shutdown() + obj.no_ap_6ghz_shutdown() diff --git a/tests/e2e/interOp/Express_WiFi/android/test_ExpressWifi_and.py b/tests/e2e/interOp/Express_WiFi/android/test_ExpressWifi_and.py deleted file mode 100644 index 352d536df..000000000 --- a/tests/e2e/interOp/Express_WiFi/android/test_ExpressWifi_and.py +++ /dev/null @@ -1,68 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_android, pytest.mark.expressWifiConnection] - -from android_lib import set_APconnMobileDevice_android, ForgetWifiConnection, expressWifi, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "XWF-OWF_DSx", "appliedRadios": ["2G"]}] - }, - "rf": {}, - "radius": False, - "express-wifi": True -} - - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestExpressWifiAndroid(object): - - @pytest.mark.twog - @pytest.mark.open - def test_ExpressWifi_Android(self, request, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Express Wifi - if expressWifi(request, ssidName, setup_perfectoMobile_android, connData): - assert True - else: - assert False - #ForgetWifi - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - - diff --git a/tests/e2e/interOp/Express_WiFi/iOS/test_ExpressWifi_ios.py b/tests/e2e/interOp/Express_WiFi/iOS/test_ExpressWifi_ios.py deleted file mode 100644 index 42e8800d0..000000000 --- a/tests/e2e/interOp/Express_WiFi/iOS/test_ExpressWifi_ios.py +++ /dev/null @@ -1,68 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.expressWifiConnection] - -from iOS_lib import closeApp, ForgetWifiConnection, set_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, \ - verifyUploadDownloadSpeediOS, expressWifi, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "XWF-OWF_DSx", "appliedRadios": ["2G"]}] - }, - "rf": {}, - "radius": False, - "express-wifi": True -} - - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestExpressWifi(object): - - @pytest.mark.twog - @pytest.mark.open - def test_ExpressWifi(self, request, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Express Wifi - if expressWifi(request, setup_perfectoMobile_iOS, connData): - assert True - else: - assert False - - # ForgetWifi - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) diff --git a/tests/e2e/interOp/README.md b/tests/e2e/interOp/README.md deleted file mode 100644 index 6cbad0a9f..000000000 --- a/tests/e2e/interOp/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# wlan-testing framework Information - -## pytest uses setup > test > tear_down -#### Fixtures : Code that needs to be part of more than 1 test cases, Setup and teardown is Implemented in Fixtures - -Requried Module Installation: -pip3 install selenium -pip3 install perfecto-py37 -pip3 install Appium-Python-Client - -Avaiable WPA2 & WPA Protocal for 5G or 2G Options -1) wpa2_personal :> - a) setup_profile_data["NAT"]["WPA2_P"]["5G"] - b) setup_profile_data["NAT"]["WPA2_P"]["2G"] -2) wpa :> - a) setup_profile_data["NAT"]["WPA"]["5G"] - b) setup_profile_data["NAT"]["WPA"]["2G"] - -Sample Execution of Test Cases for a maximum of 4 devices in parallel only. - -Required Parameters: -1) securityToken= -2) jobName= -3) jobNumber= -4) model-iOS=iPhone.* < Picks any random iphone or use any device below. - a) iPhone-11.* (Picks any random iphone 11) - b) iPhone-12.* (Picks any random iphone 12) - c) iPhone-7.* (Picks any random iphone 7) - d) iPhone-XR.* (Picks any random iphone XR) - Note:Only 1 device of each are avaible on the cloud. You can only assign 1 test case to to a phone @ a time. - -Sample Execution of Tests from CI: - -Execute AccessPassPointConnectivety Test Case with wpa2_personal & fiveg -#pytest -m "AccessPassPointConnectivety and wpa2_personal and fiveg" -s -vvv --testbed=interop -o 'model-iOS=iPhone.*' -o 'jobName=TestRajMay' -o 'jobNumber=2' -o 'securityToken=' - -pytest -m "ToggleAirplaneMode and wpa2_personal and fiveg" -s -vvv --testbed=interop -o 'model-iOS=iPhone.*' -o 'jobName=TestRajMay' -o 'jobNumber=2' -o 'securityToken=' - -pytest -m "ClientConnectivity and wpa2_personal and fiveg" -s -vvv --testbed=interop -o 'model-iOS=iPhone.*' -o 'jobName=TestRajMay' -o 'jobNumber=2' -o 'securityToken=' - -pytest -m "PassPointConnection and wpa2_personal and fiveg" -s -vvv --testbed=interop -o 'model-iOS=iPhone.*' -o 'jobName=TestRajMay' -o 'jobNumber=2' -o 'securityToken=' - -pytest -m "ToggleWifiMode and wpa2_personal and fiveg" -s -vvv --testbed=interop -o 'model-iOS=iPhone.*' -o 'jobName=TestRajMay' -o 'jobNumber=2' -o 'securityToken=' - -#### For any Clarifications, regarding Framework, -#### Email : shivam.thakur@candelatech.com -#### Email : rpasupathy@perforce.com - - - diff --git a/tests/e2e/interOp/captive_portal/nat_mode/android/test_captive_portal_modes.py b/tests/e2e/interOp/captive_portal/nat_mode/android/test_captive_portal_modes.py deleted file mode 100644 index c28e4aebd..000000000 --- a/tests/e2e/interOp/captive_portal/nat_mode/android/test_captive_portal_modes.py +++ /dev/null @@ -1,373 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, captive_portal_and - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.internal_captive_portal - ,pytest.mark.regression_interop, pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "nat_captive_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "nat_captive_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "nat_captive_wpa_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}], - "wpa2_personal": [{"ssid_name": "nat_captive_wpa2_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}], - "wpa3_personal": [ - {"ssid_name": "nat_captive_wpa3_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa3_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}]}, - "rf": {}, - "radius": False, - "captive_portal": True -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Captive Portal : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CAPTIVE PORTAL") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNATModeCaptivePortalSuiteOneNAT(object): - """ Captive Portal SuiteA - pytest -m "captive portal and nat and InteropsuiteA" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5178", name="WIFI-5178") - @pytest.mark.twog - @pytest.mark.open - def test_Captive_Portal_Open_2g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5141", name="WIFI-5141") - @pytest.mark.fiveg - @pytest.mark.open - def test_Captive_Portal_Open_5g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5180", name="WIFI-5180") - @pytest.mark.twog - @pytest.mark.wpa - def test_Captive_Portal_WPA_2g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5144", name="WIFI-5144") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_Captive_Portal_WPA_5g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5184", name="WIFI-5184") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_Captive_Portal_WPA2_2g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5147", name="WIFI-5147") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_Captive_Portal_WPA2_5g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5129", name="WIFI-5129") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_Captive_Portal_WPA3_2g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5137", name="WIFI-5137") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_Captive_Portal_WPA3_5g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/captive_portal/nat_mode/ios/test_captive_portal_modes.py b/tests/e2e/interOp/captive_portal/nat_mode/ios/test_captive_portal_modes.py deleted file mode 100644 index e24c7621c..000000000 --- a/tests/e2e/interOp/captive_portal/nat_mode/ios/test_captive_portal_modes.py +++ /dev/null @@ -1,367 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios, captive_portal_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.internal_captive_portal, pytest.mark.regression_interop, pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "nat_captive_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "nat_captive_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "nat_captive_wpa_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}], - "wpa2_personal": [{"ssid_name": "nat_captive_wpa2_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}], - "wpa3_personal": [ - {"ssid_name": "nat_captive_wpa3_2g", "appliedRadios": ["2G"], "security_key": "lanforge"}, - {"ssid_name": "nat_captive_wpa3_5g", "appliedRadios": ["5G"], - "security_key": "lanforge"}]}, - "rf": {}, - "radius": False, - "captive_portal": True - -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="NAT Mode Captive Portal : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CAPTIVE PORTAL") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeCaptivePortalSuiteOneNAT(object): - """ Captive Portal SuiteA - pytest -m "captive portal and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5179", name="WIFI-5179") - @pytest.mark.twog - @pytest.mark.open - def test_Captive_Portal_Open_2g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5146", name="WIFI-5146") - @pytest.mark.fiveg - @pytest.mark.open - def test_Captive_Portal_Open_5g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5182", name="WIFI-5182") - @pytest.mark.twog - @pytest.mark.wpa - def test_Captive_Portal_WPA_2g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5149", name="WIFI-5149") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_Captive_Portal_WPA_5g_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5186", name="WIFI-5186") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_Captive_Portal_WPA2_2g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5153", name="WIFI-5153") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_Captive_Portal_WPA2_5g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5130", name="WIFI-5130") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_Captive_Portal_WPA3_2g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5140", name="WIFI-5140") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_Captive_Portal_WPA3_5g_Personal_NAT(self, request, get_vif_state, get_ap_logs, - get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = captive_portal_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - # wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/conftest.py b/tests/e2e/interOp/conftest.py index 679dde2ba..c96e52bc5 100644 --- a/tests/e2e/interOp/conftest.py +++ b/tests/e2e/interOp/conftest.py @@ -1,730 +1,41 @@ -import datetime -import sys -import os -import time -import warnings -from selenium.common.exceptions import NoSuchElementException -import urllib3 -from perfecto.model.model import Job, Project -from perfecto import (PerfectoExecutionContext, PerfectoReportiumClient, TestContext, TestResultFactory) +import allure import pytest import logging -import re -import allure -import requests -from xml.etree import ElementTree as ET -from time import gmtime, strftime - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') -import allure -from apnos.apnos import APNOS -from controller.controller_1x.controller import Controller -from controller.controller_1x.controller import ProfileUtility -from controller.controller_2x.controller import UProfileUtility -from controller.controller_1x.controller import FirmwareUtility -import pytest -import logging -from configuration import RADIUS_SERVER_DATA - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "tests" not in sys.path: - sys.path.append(f'../tests') - -from configuration import CONFIGURATION -from configuration import PERFECTO_DETAILS - -from urllib3 import exceptions - -reporting_client = None -testCaseNameList = [] -testCaseStatusList = [] -testCaseErrorMsg = [] -testCaseReportURL = [] - - -@pytest.fixture(scope="function") -def get_PassPointConniOS_data(request, get_device_configuration): - passPoint_data = { - "netAnalyzer-inter-Con-Xpath": "//*[@label='Network Connected']/parent::*/XCUIElementTypeButton", - "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], - "bundleId-iOS-Ping": get_device_configuration["bundleId-iOS-Ping"] - } - yield passPoint_data - - -@pytest.fixture(scope="function") -def get_APToMobileDevice_data(request, get_device_configuration): - passPoint_data = { - "webURL": "https://www.google.com", - "lblSearch": "//*[@class='gLFyf']", - "elelSearch": "(//*[@class='sbic sb43'])[1]", - "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", - "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], - "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], - "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", - "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", - # Android - "platformName-android": get_device_configuration["platformName-android"], - "appPackage-android": get_device_configuration["appPackage-android"] - } - yield passPoint_data - - -@pytest.fixture(scope="function") -def get_AccessPointConn_data(request, get_device_configuration): - passPoint_data = { - "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], - "bundleId-iOS-Ping": get_device_configuration["bundleId-iOS-Ping"] - } - yield passPoint_data - - -@pytest.fixture(scope="function") -def get_ToggleAirplaneMode_data(request, get_device_configuration): - passPoint_data = { - "webURL": "https://www.google.com", - "lblSearch": "//*[@class='gLFyf']", - "elelSearch": "(//*[@class='sbic sb43'])[1]", - "BtnRunSpeedTest": "//*[text()='RUN SPEED TEST']", - "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], - "bundleId-iOS-Safari": get_device_configuration["bundleId-iOS-Safari"], - "downloadMbps": "//*[@id='knowledge-verticals-internetspeedtest__download']/P[@class='spiqle']", - "UploadMbps": "//*[@id='knowledge-verticals-internetspeedtest__upload']/P[@class='spiqle']", - # Android - "platformName-android": get_device_configuration["platformName-android"], - "appPackage-android": get_device_configuration["appPackage-android"] - } - yield passPoint_data - - -@pytest.fixture(scope="function") -def get_ToggleWifiMode_data(request,get_device_configuration): - passPoint_data = { - # iOS - "bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"], - # Android - "platformName-android": get_device_configuration["platformName-android"], - "appPackage-android": get_device_configuration["appPackage-android"] - } - yield passPoint_data - - -@pytest.fixture(scope="function") -def get_lanforge_data(testbed): - lanforge_data = {} - if CONFIGURATION[testbed]['traffic_generator']['name'] == 'lanforge': - lanforge_data = { - "lanforge_ip": CONFIGURATION[testbed]['traffic_generator']['details']['ip'], - "lanforge-port-number": CONFIGURATION[testbed]['traffic_generator']['details']['port'], - "lanforge_2dot4g": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Radio'][0], - "lanforge_5g": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Radio'][0], - "lanforge_2dot4g_prefix": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Station-Name'], - "lanforge_5g_prefix": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Station-Name'], - "lanforge_2dot4g_station": CONFIGURATION[testbed]['traffic_generator']['details']['2.4G-Station-Name'], - "lanforge_5g_station": CONFIGURATION[testbed]['traffic_generator']['details']['5G-Station-Name'], - "lanforge_bridge_port": CONFIGURATION[testbed]['traffic_generator']['details']['upstream'], - "lanforge_vlan_port": CONFIGURATION[testbed]['traffic_generator']['details']['upstream'] + ".100", - "vlan": 100 - } - yield lanforge_data - - -@pytest.fixture(scope="session") -def instantiate_profile(request): - if request.config.getoption("1.x"): - yield ProfileUtility - else: - yield UProfileUtility - - - -@pytest.fixture(scope="session") -def upload_firmware(should_upload_firmware, instantiate_firmware, get_latest_firmware): - firmware_id = instantiate_firmware.upload_fw_on_cloud(fw_version=get_latest_firmware, - force_upload=should_upload_firmware) - yield firmware_id - - -@pytest.fixture(scope="session") -def upgrade_firmware(request, instantiate_firmware, get_equipment_ref, check_ap_firmware_cloud, get_latest_firmware, - should_upgrade_firmware): - if get_latest_firmware != check_ap_firmware_cloud: - if request.config.getoption("--skip-upgrade"): - status = "skip-upgrade" - else: - status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_ref, force_upload=False, - force_upgrade=should_upgrade_firmware) - else: - if should_upgrade_firmware: - status = instantiate_firmware.upgrade_fw(equipment_id=get_equipment_ref, force_upload=False, - force_upgrade=should_upgrade_firmware) - else: - status = "skip-upgrade" - yield status - - -@pytest.fixture(scope="session") -def check_ap_firmware_cloud(setup_controller, get_equipment_ref): - yield setup_controller.get_ap_firmware_old_method(equipment_id=get_equipment_ref) - - -""" - -Profiles Related Fixtures - -""" - - -@pytest.fixture(scope="module") -def get_current_profile_cloud(instantiate_profile): - ssid_names = [] - for i in instantiate_profile.profile_creation_ids["ssid"]: - ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i)) - yield ssid_names - - -@pytest.fixture(scope="session") -def setup_vlan(): - vlan_id = [100] - yield vlan_id[0] - @pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtures_ver, skip_lf, get_openflow, run_lf, - instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info): +def setup_configuration(request, get_markers, get_target_object, run_lf): + # Predefined selected markers and selected configuration - param = dict(request.param) - if not skip_lf: - lf_tools.reset_scenario() - # VLAN Setup - if request.param["mode"] == "VLAN": + conf = dict(request.param) + configuration = conf.copy() + requested_combination = [] + for key in get_markers: + if get_markers[key]: + requested_combination.append(get_markers[key]) - vlan_list = list() - refactored_vlan_list = list() - ssid_modes = request.param["ssid_modes"].keys() - for mode in ssid_modes: - for ssid in range(len(request.param["ssid_modes"][mode])): - if "vlan" in request.param["ssid_modes"][mode][ssid]: - vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) - else: - pass - if vlan_list: - [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] - vlan_list = refactored_vlan_list - for i in range(len(vlan_list)): - if vlan_list[i] > 4095 or vlan_list[i] < 1: - vlan_list.pop(i) - if request.param["mode"] == "VLAN": - lf_tools.add_vlan(vlan_ids=vlan_list) - - # call this, if 1.x - return_var = fixtures_ver.setup_profiles(request, param, setup_controller, testbed, get_equipment_ref, - instantiate_profile, - get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, - radius_accounting_info, skip_lf=skip_lf, open_flow=get_openflow, run_lf=run_lf) - print("sleeping for 120 sec.") - time.sleep(180) - print("Done sleeping") - yield return_var - - -@pytest.fixture(scope="function") -def update_ssid(request, instantiate_profile, setup_profile_data): - requested_profile = str(request.param).replace(" ", "").split(",") - profile = setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]] - status = instantiate_profile.update_ssid_name(profile_name=profile["profile_name"], - new_profile_name=requested_profile[3]) - setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]]["profile_name"] = \ - requested_profile[3] - setup_profile_data[requested_profile[0]][requested_profile[1]][requested_profile[2]]["ssid_name"] = \ - requested_profile[3] - time.sleep(90) - yield status - - -# @pytest.fixture(scope="module", autouse=True) -def failure_tracking_fixture(request): - tests_failed_before_module = request.session.testsfailed - print("\n\ntests_failed_before_module: ") - print(tests_failed_before_module) - tests_failed_during_module = request.session.testsfailed - tests_failed_before_module - print("tests_failed_during_module: ") - print(tests_failed_during_module) - yield tests_failed_during_module - - - -empty_get_vif_state_list = [] + # Method to setup the basic configuration + data = {} + if not run_lf: + data = get_target_object.setup_basic_configuration(configuration=configuration, + requested_combination=requested_combination) + logging.info("dut_data after config applied: " + str(data)) + yield data @pytest.fixture(scope="class") -def get_vif_state(get_apnos, get_configuration, request, lf_tools, skip_lf): - if not skip_lf: - if request.config.getoption("1.x"): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - yield vif_state - else: - yield lf_tools.ssid_list - else: - yield empty_get_vif_state_list - -@pytest.hookimpl(tryfirst=True, hookwrapper=True) -def pytest_runtest_makereport(item, call): - outcome = yield - result = outcome.get_result() - # testCaseStatusValue = "" - testCasePassedStatusValue = "" - testCaseFailedStatusValue = "" - testCaseNameList = [] - testCaseStatusList = [] - testCaseErrorMsg = [] - testCaseReportURL = [] - - if os.environ.get('PYTEST_CURRENT_TEST') is not None: - if (str(os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]).strip()).startswith("test_unique"): - return 0 - - # if os.environ.get('PYTEST_CURRENT_TEST') is not None and ((os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]).strip()).startswith("test_unique_ssid"): - # return 0; - - if result.when == 'call': - item.session.results[item] = result - - # Gets the Current Test Case Name - TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0] - nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName) - # print("TestCasefullNameTEST: " + TestCaseFullName) - try: - # TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_') - TestCaseName = nCurrentTestMethodNameSplit.replace('test_', '') - # print ("\nTestCaseName: " + TestCaseName) - except Exception as e: - TestCaseName = nCurrentTestMethodNameSplit - print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL") - # print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/") - - # exception = call.excinfo.value - # exception_class = call.excinfo.type - # exception_class_name = call.excinfo.typename - - # exception_traceback = call.excinfo.traceback - - if result.outcome == "failed": - exception_type_and_message_formatted = call.excinfo.exconly() - testCaseFailedStatusValue = "FAILED" - reporting_client.test_stop(TestResultFactory.create_failure(str(testCaseErrorMsg))) - testCaseNameList.append(TestCaseName) - testCaseStatusList.append(testCaseFailedStatusValue) - testCaseErrorMsg.append(exception_type_and_message_formatted) - testCaseReportURL.append(reporting_client.report_url()) - - print("\n TestStatus: " + testCaseFailedStatusValue) - print(" FailureMsg: " + str(testCaseErrorMsg)) - reportPerfecto(TestCaseName, testCaseFailedStatusValue, testCaseErrorMsg, - str(reporting_client.report_url())) - - if result.outcome == "passed": - testCasePassedStatusValue = "PASSED" - reporting_client.test_stop(TestResultFactory.create_success()) - testCaseNameList.append(TestCaseName) - testCaseStatusList.append(testCasePassedStatusValue) - testCaseReportURL.append(reporting_client.report_url()) - print("\n TestStatus: " + testCasePassedStatusValue) - reportPerfecto(TestCaseName, testCasePassedStatusValue, "N/A", str(reporting_client.report_url())) - - if result.outcome == "skipped": - testCaseSkippedStatusValue = "SKIPPED" - exception_type_Skipped_message_formatted = call.excinfo.exconly() - reporting_client.test_stop(TestResultFactory.create_failure(str(exception_type_Skipped_message_formatted))) - testCaseNameList.append(TestCaseName) - testCaseStatusList.append("SKIPPED") - testCaseErrorMsg.append(str(exception_type_Skipped_message_formatted)) - testCaseReportURL.append(reporting_client.report_url()) - print("\n TestStatus: " + testCaseSkippedStatusValue) - print(" FailureMsg: " + str(testCaseErrorMsg)) - reportPerfecto(TestCaseName, testCaseSkippedStatusValue, testCaseErrorMsg, - str(reporting_client.report_url())) - - -def pytest_sessionfinish(session, exitstatus): - - try: - if reporting_client is not None: - print() - skipped_amount = 0 - # print('Perfecto TestCase Execution Status:', exitstatus) - passed_amount = sum(1 for result in session.results.values() if result.passed) - failed_amount = sum(1 for result in session.results.values() if result.failed) - skipped_amount = sum(1 for result in session.results.values() if result.skipped) - # print(f'There are {passed_amount} passed and {failed_amount} failed tests') - TotalExecutedCount = failed_amount + passed_amount + skipped_amount - - print('\n------------------------------------') - print('TestCase Execution Summary') - print('------------------------------------') - print('Total TestCase Executed: ' + str(TotalExecutedCount)) - print('Total Passed: ' + str(passed_amount)) - print('Total Failed: ' + str(failed_amount)) - print('Total Skipped: ' + str(skipped_amount) + "\n") - try: - for index in range(len(testCaseNameList)): - print(str(index + 1) + ") " + str(testCaseNameList[index]) + " : " + str(testCaseStatusList[index])) - print(" ReportURL: " + str(testCaseReportURL[index])) - print(" FailureMsg: " + str(testCaseErrorMsg[index]) + "\n") - except Exception as e: - print('No Interop Test Cases Executed') - else: - pass - - except Exception as e: - pass - print('\n------------------------------------------------------------------\n\n\n\n') - - -@pytest.fixture(scope="function") -def setup_perfectoMobile_android(request, get_device_configuration): - from appium import webdriver - driver = None - reporting_client = None - - warnings.simplefilter("ignore", ResourceWarning) - urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - - capabilities = { - 'platformName': get_device_configuration["platformName-android"], - 'model': get_device_configuration["model-android"], - 'browserName': 'mobileOS', - # 'automationName' : 'Appium', - 'securityToken': PERFECTO_DETAILS["securityToken"], - 'useAppiumForWeb': 'false', - 'useAppiumForHybrid': 'false', - # 'bundleId' : request.config.getini("appPackage-android"), - } - - if not is_device_Available_timeout(request, capabilities['model']): - print("Unable to get device.") - pytest.exit("Exiting Pytest") - - driver = webdriver.Remote( - 'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', - capabilities) - driver.implicitly_wait(2) - - TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0] - nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName) - try: - # TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_') - TestCaseName = nCurrentTestMethodNameSplit.replace('test_', '') - print("\n\nExecuting TestCase: " + TestCaseName) - except Exception as e: - TestCaseName = nCurrentTestMethodNameSplit - print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL") - # print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/") - - projectname = PERFECTO_DETAILS["projectName"] - projectversion = PERFECTO_DETAILS["projectVersion"] - jobname = get_device_configuration["jobName"] - jobnumber = get_device_configuration["jobNumber"] - tags = PERFECTO_DETAILS["reportTags"] - testCaseName = TestCaseName - - # print("\nSetting Perfecto ReportClient....") - perfecto_execution_context = PerfectoExecutionContext(driver, tags, Job(jobname, jobnumber), - Project(projectname, projectversion)) - reporting_client = PerfectoReportiumClient(perfecto_execution_context) - reporting_client.test_start(testCaseName, TestContext([], "Perforce")) - reportClient(reporting_client) - - try: - params = {'property': 'model'} - deviceModel = driver.execute_script('mobile:handset:info', params) - except: - pass - - def teardown(): - try: - print("\n---------- Tear Down ----------") - try: - params = {'property': 'model'} - deviceModel = driver.execute_script('mobile:handset:info', params) - allure.dynamic.link( - str(reporting_client.report_url()), - name=str(deviceModel)) - except: - print("fail to attach video link") - - print('Report-Url: ' + reporting_client.report_url()) - - print("----------------------------------------------------------\n\n\n\n") - driver.close() - except Exception as e: - print(" -- Exception While Tear Down --") - driver.close() - print(e) - finally: - try: - driver.quit() - except Exception as e: - print(" -- Exception Not Able To Quit --") - print(e) - - request.addfinalizer(teardown) - - if driver is None: - yield -1 - else: - yield driver, reporting_client - - -def reportClient(value): - global reporting_client # declare a to be a global - reporting_client = value # this sets the global value of a - - -def reportPerfecto(testCaseName, testCaseStatus, testErrorMsg, reportURL): - global testCaseNameList # declare a to be a global - global testCaseStatusList - global testCaseErrorMsg - global testCaseReportURL - - testCaseNameList.append(testCaseName) - testCaseStatusList.append(testCaseStatus) - testCaseErrorMsg.append(str(testErrorMsg)) - testCaseReportURL.append(reportURL) - - -@pytest.fixture(scope="class") -def setup_perfectoMobileWeb(request, get_device_configuration): - from selenium import webdriver - rdriver = None - reporting_client = None - - warnings.simplefilter("ignore", ResourceWarning) - urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - - capabilities = { - 'platformName': get_device_configuration["platformName-iOS"], - 'model': get_device_configuration["model-iOS"], - 'browserName': get_device_configuration["browserType-iOS"], - 'securityToken': get_device_configuration["securityToken"], - } - - if not is_device_Available_timeout(request, capabilities['model']): - print("Unable to get device.") - pytest.exit("Exiting Pytest") - - rdriver = webdriver.Remote( - 'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', - capabilities) - rdriver.implicitly_wait(2) - - projectname = PERFECTO_DETAILS["projectName"] - projectversion = PERFECTO_DETAILS["projectVersion"] - jobname = get_device_configuration["jobName"] - jobnumber = get_device_configuration["jobNumber"] - tags = PERFECTO_DETAILS["reportTags"] - testCaseName = get_device_configuration["jobName"] - - print("Setting Perfecto ReportClient....") - perfecto_execution_context = PerfectoExecutionContext(rdriver, tags, Job(jobname, jobnumber), - Project(projectname, projectversion)) - reporting_client = PerfectoReportiumClient(perfecto_execution_context) - reporting_client.test_start(testCaseName, TestContext([], "Perforce")) - - def teardown(): - try: - print(" -- Tear Down --") - reporting_client.test_stop(TestResultFactory.create_success()) - print('Report-Url: ' + reporting_client.report_url() + '\n') - rdriver.close() - except Exception as e: - print(" -- Exception Not Able To close --") - print(e.message) - finally: - try: - rdriver.quit() - except Exception as e: - print(" -- Exception Not Able To Quit --") - print(e.message) - - request.addfinalizer(teardown) - - if rdriver is None: - yield -1 - else: - yield rdriver, reporting_client - - -@pytest.fixture(scope="function") -def setup_perfectoMobile_iOS(request, get_device_configuration): - from appium import webdriver - driver = None - reporting_client = None - - warnings.simplefilter("ignore", ResourceWarning) - urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - - capabilities = { - 'platformName': get_device_configuration["platformName-iOS"], - 'model': get_device_configuration["model-iOS"], - 'browserName': 'safari', - # 'automationName' : 'Appium', - 'securityToken': PERFECTO_DETAILS["securityToken"], - 'useAppiumForWeb': 'false', - 'autoAcceptAlerts': 'true', - # 'bundleId' : request.config.getini("bundleId-iOS"), - 'useAppiumForHybrid': 'false', - } - - # Check if the device is available - if not is_device_Available_timeout(request, capabilities['model']): - print("Unable to get device.") - pytest.exit("Exiting Pytest") - - driver = webdriver.Remote( - 'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub', - capabilities) - driver.implicitly_wait(2) - - TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0] - nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName) - try: - # TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_') - TestCaseName = nCurrentTestMethodNameSplit.replace('test_', '') - print("\n\nExecuting TestCase: " + TestCaseName) - except Exception as e: - TestCaseName = nCurrentTestMethodNameSplit - print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL") - # print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/") - - projectname = PERFECTO_DETAILS["projectName"] - projectversion = PERFECTO_DETAILS["projectVersion"] - jobname = get_device_configuration["jobName"] - jobnumber = get_device_configuration["jobNumber"] - tags = PERFECTO_DETAILS["reportTags"] - testCaseName = TestCaseName - - print("\nSetting Perfecto ReportClient....") - perfecto_execution_context = PerfectoExecutionContext(driver, tags, Job(jobname, jobnumber), - Project(projectname, projectversion)) - reporting_client = PerfectoReportiumClient(perfecto_execution_context) - reporting_client.test_start(testCaseName, TestContext([], "Perforce")) - reportClient(reporting_client) - try: - params = {'property': 'model'} - deviceModel = driver.execute_script('mobile:handset:info', params) - except: - pass - - def teardown(): - try: - print("\n---------- Tear Down ----------") - print('Report-Url: ' + reporting_client.report_url()) - try: - allure.dynamic.link( - str(reporting_client.report_url()), - name=str(deviceModel)) - except: - print("fail to attach video link") - print("----------------------------------------------------------\n\n\n\n") - driver.close() - except Exception as e: - print(" -- Exception While Tear Down --") - driver.close() - print(e) - finally: - try: - driver.quit() - except Exception as e: - print(" -- Exception Not Able To Quit --") - print(e) - - request.addfinalizer(teardown) - - if driver is None: - yield -1 - else: - yield driver, reporting_client -# Does a HTTP GET request to Perfecto cloud and gets response and information related to a headset -def response_device(request, model): - securityToken = PERFECTO_DETAILS["securityToken"] - perfectoURL = PERFECTO_DETAILS["perfectoURL"] - url = f"https://{perfectoURL}.perfectomobile.com/services/handsets?operation=list&securityToken={securityToken}&model={model}" - resp = requests.get(url=url) - return ET.fromstring(resp.content) - -# Get an attribute value from the handset response -def get_attribute_device(responseXml, attribute): - try: - return responseXml.find('handset').find(attribute).text - except: - print(f"Unable to get value of {attribute} from response") - return "" - -# Checks to see if a particular handset is available -def is_device_available(request, model): - try: - responseXml = response_device(request, model) - except: - print("Unable to get response.") - raise Exception("Unable to get response.") - device_available = get_attribute_device(responseXml, 'available') - print("Result:" + device_available) - if device_available == 'true': - return True - else: - allocated_to = get_attribute_device(responseXml, 'allocatedTo') - print("The device is currently allocated to:" + allocated_to) - return False - -# Checks whether the device is available or not.If the device is not available rechecks depending upon the - -# Checks whether the device is available or not.If the device is not available rechecks depending upon the -# 'timerValue' and 'timerThreshold' values.With the current parameters it will check after:10,20,40,80 mins. -def is_device_Available_timeout(request, model): - device_available = is_device_available(request, model) - timerValue = 5 - timerThreshold = 80 - if not device_available: - while(timerValue <= timerThreshold): - print("Last checked at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) - print(f"Waiting for: {timerValue} min(s)") - time.sleep(timerValue*60) - print("Checking now at:" + strftime("%Y-%m-%d %H:%M:%S", gmtime())) - device_available = is_device_available(request, model) - if(device_available): - return True - else: - timerValue = timerValue + 5 - - if(timerValue > timerThreshold): - return False - else: - return True - else: - return True - -def get_device_attribuites(request, model, attribute): - try: - responseXml = response_device(request, model) - except: - print("Unable to get response.") - raise Exception("Unable to get response.") - try: - attribute_value = get_attribute_device(responseXml, str(attribute)) - except: - attribute_value = False - return attribute_value +def setup_open_roaming_configuration(request, get_markers, get_target_object, run_lf): + # Predefined selected markers and selected configuration + + conf = dict(request.param) + configuration = conf.copy() + requested_combination = [] + for key in get_markers: + if get_markers[key]: + requested_combination.append(get_markers[key]) + + # Method to setup the basic configuration + data = {} + if not run_lf: + data = get_target_object.setup_basic_configuration(configuration=configuration, requested_combination= + requested_combination, open_roaming=True) + logging.info("dut_data after config applied: " + str(data)) + yield data \ No newline at end of file diff --git a/tests/e2e/interOp/openroaming_test/android/conftest.py b/tests/e2e/interOp/openroaming_test/android/conftest.py deleted file mode 100644 index 14617dc15..000000000 --- a/tests/e2e/interOp/openroaming_test/android/conftest.py +++ /dev/null @@ -1,390 +0,0 @@ -import os -import sys - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f"../libs") - -import time -import pytest -import allure -from collections import defaultdict -from lanforge.lf_tests import RunTest -from configuration import PASSPOINT_RADIUS_SERVER_DATA -from configuration import PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA -from configuration import PASSPOINT_PROVIDER_INFO -from configuration import PASSPOINT_OPERATOR_INFO -from configuration import PASSPOINT_VENUE_INFO -from configuration import PASSPOINT_PROFILE_INFO -from controller.controller_1x.controller import ProfileUtility - - -@allure.feature("PASSPOINT CONNECTIVITY SETUP") -@pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_ref, - instantiate_profile, get_markers, passpoint_provider_info, passpoint_operator_info, - passpoint_venue_info, passpoint_profile_info, - get_configuration, passpoint_radius_server_info, passpoint_radius_accounting_server_info, get_apnos): - instantiate_profile = instantiate_profile(sdk_client=setup_controller) - vlan_id, mode = 0, 0 - instantiate_profile.cleanup_objects() - parameter = dict(request.param) - test_cases = {} - profile_data = {} - if parameter["mode"] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter["mode"]) - yield test_cases - - if parameter["mode"] == "NAT": - mode = "NAT" - vlan_id = 1 - if parameter["mode"] == "BRIDGE": - mode = "BRIDGE" - vlan_id = 1 - if parameter["mode"] == "VLAN": - mode = "BRIDGE" - vlan_id = setup_vlan - - ap_profile = testbed + "-Equipment-AP-Passpoint" - instantiate_profile.delete_profile_by_name(profile_name=ap_profile) - profile_data["equipment_ap"] = {"profile_name": ap_profile} - - profile_data["ssid"] = {} - # Only passpoint SSID need to be applied with passpoint profiles leaving ssid used for - # profile download - passpoint_profile_download - profile_data["allowed_ssids"] = [] - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - profile_name = testbed + "-SSID-" + i + "-" + str(j) + "-" + parameter["mode"] - data = parameter["ssid_modes"][i][j] - data["profile_name"] = profile_name - if "mode" not in dict(data).keys(): - data["mode"] = mode - if "vlan" not in dict(data).keys(): - data["vlan"] = vlan_id - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - profile_data["ssid"][i].append(data) - - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode) - time.sleep(10) - - # RF Profile Creation - rf_profile_data = { - "name": testbed + "-RF-Profile-" + parameter["mode"] + "-" + get_configuration["access_point"][0]["mode"] - } - try: - instantiate_profile.delete_profile_by_name(profile_name=rf_profile_data["name"]) - rf_profile_data = instantiate_profile.set_rf_profile(profile_data=rf_profile_data, - mode=get_configuration["access_point"][0]["mode"]) - allure.attach(body=str(rf_profile_data), - name="RF Profile Created : " + get_configuration["access_point"][0]["mode"]) - except Exception as e: - print(e) - allure.attach(body=str(e), name="Exception ") - - # Radius Profile Creation - passpoint_radius_server_info = passpoint_radius_server_info - passpoint_radius_server_info["name"] = testbed + "-Automation-Radius-Profile" - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile") - try: - instantiate_profile.create_radius_profile(radius_info=passpoint_radius_server_info, - radius_accounting_info=passpoint_radius_accounting_server_info) - test_cases["radius_profile"] = True - allure.attach(body=str(passpoint_radius_server_info), name="Radius Profile Created") - except Exception as e: - print(e) - test_cases["radius_profile"] = False - - # SSID Profile Creation - for mode in profile_data["ssid"]: - if mode == "open": - for j in profile_data["ssid"][mode]: - try: - if "is2dot4GHz" in list(j["appliedRadios"]): - creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["wpa_eap_5g"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa2_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa2_only_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_only_eap_passpoint_ssid_profile( - profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_only_eap_passpoint_ssid_profile( - profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - - # Passpoint OSU ID provider profile creation - passpoint_provider_info = passpoint_provider_info - test_cases["passpoint_osu_id_provider"] = dict() - profile_name = testbed + "-Automation-Passpoint-OSU-ID-Provider-Profile" - passpoint_provider_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_osu_id_provider_profile( - profile_data=passpoint_provider_info) - allure.attach(body=str(creates_profile), name="Passpoint OSU ID provider Profile Created") - test_cases["passpoint_osu_id_provider"] = {"sdk": True} - except Exception as e: - print(e) - test_cases["passpoint_osu_id_provider"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint OSU ID provider Profile Creation Failed") - - # Passpoint operator profile creation - test_cases["passpoint_operator_profile"] = dict() - passpoint_operator_info = passpoint_operator_info - profile_name = testbed + "-Automation-Passpoint-Operator-Profile" - passpoint_operator_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_operator_profile(profile_data=passpoint_operator_info) - allure.attach(body=str(creates_profile), name="Passpoint Operator Profile Created") - test_cases["passpoint_operator_profile"] = {"sdk": True} - profile_data["passpoint_operator"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint_operator_profile"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Operator Profile Creation Failed") - - # Passpoint Venue profile creation - passpoint_venue_info = passpoint_venue_info - test_cases["passpoint_venue_profile"] = dict() - profile_name = testbed + "-Automation-Passpoint-Venue-Profile" - passpoint_venue_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_venue_profile(profile_data=passpoint_venue_info) - allure.attach(body=str(creates_profile), name="Passpoint Venue Profile Created") - test_cases["passpoint_venue_profile"] = {"sdk": True} - profile_data["passpoint_venue"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint_venue"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Venue Profile Creation Failed") - - # Passpoint profile creation - passpoint_profile_info = passpoint_profile_info - profile_name = testbed + "-Automation-Passpoint-Profile" - passpoint_profile_info["profile_name"] = profile_name - passpoint_profile_info["allowed_ssids"] = profile_data["allowed_ssids"] - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_profile(profile_data=passpoint_profile_info) - allure.attach(body=str(creates_profile), name="Passpoint Profile Created") - test_cases["passpoint"] = {"sdk": True} - profile_data["passpoint"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Profile Creation Failed") - - # Update SSID profile with passpoint config - passpoint_profile_info = passpoint_profile_info - ssid_to_apply = None - for ssid_profile in profile_data["ssid"].keys(): - for ssid in profile_data["ssid"][ssid_profile]: - if ssid["ssid_name"] == "passpoint_profile_download": - ssid_to_apply = ssid["ssid_name"] - continue - if ssid["ssid_name"] in test_cases.keys(): - allure.attach(body=str(ssid), name="Updating SSID profile") - passpoint_profile_info["ssid_profile_name"] = ssid["profile_name"] - instantiate_profile.update_ssid_profile(profile_info=passpoint_profile_info) - - # Equipment AP Profile Creation - ap_profile_info = dict() - ap_profile_info["profile_name"] = profile_data["equipment_ap"]["profile_name"] - ap_profile_info["ssid_names"] = [ssid_to_apply] - try: - instantiate_profile.set_ap_profile_custom(profile_data=ap_profile_info) - test_cases["equipment_ap"] = {"sdk": True} - allure.attach(body=str(profile_data["equipment_ap"]), name="Equipment AP Profile Created") - except Exception as e: - print(e) - test_cases["equipment_ap"] = {"sdk": False} - allure.attach(body=str(e), name="Equipment AP Profile Creation Failed") - - - def teardown_session(): - print("\nRemoving Profiles") - instantiate_profile.delete_profile_by_name(profile_name=profile_data['equipment_ap']['profile_name']) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["ssid"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["radius"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["rf"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_osu_id_provider"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_operator"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_venue"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint"]) - allure.attach(body=str(profile_data['equipment_ap']['profile_name'] + "\n"), - name="Tear Down in Profiles ") - time.sleep(20) - - request.addfinalizer(teardown_session) - yield test_cases, instantiate_profile, profile_data - - -@pytest.fixture(scope="function") -def push_ap_profile(request, setup_profiles, get_equipment_ref, get_apnos, get_configuration): - parameter = dict(request.param) - test_cases, instantiate_profile, profile_data = setup_profiles - ssid_names = parameter["ssid_names"] - ap_profile_info = dict() - ap_profile_info["profile_name"] = profile_data["equipment_ap"]["profile_name"] - test_cases = {} - ap_profile_info["ssid_names"] = ssid_names - try: - instantiate_profile.update_ap_profile(profile_data=ap_profile_info) - test_cases["equipment_ap"] = {"sdk": True} - allure.attach(body=str(ap_profile_info["profile_name"]), name="Equipment AP Profile Updated") - except Exception as e: - print(e) - test_cases["equipment_ap"] = {"sdk": False} - allure.attach(body=str(e), name="Equipment AP Profile Update Failed") - - print("Pushing profiles on AP :: ", ap_profile_info) - allure.attach(body=str(ap_profile_info), name="Pushing profiles on AP :: ") - # Push the Equipment AP Profile to AP - try: - for i in get_equipment_ref: - instantiate_profile.push_profile_old_method(equipment_id=i) - except Exception as e: - print(e) - print("failed to push AP Profile") - - # Check the VIF Config and VIF State of SSIDs - time_start = time.time() - ap_ssh = get_apnos(get_configuration["access_point"][0], pwd="../libs/apnos/") - while time.time() - time_start < 240: - if ((time.time() - time_start) / 10) == 15: - ap_ssh = get_apnos(get_configuration["access_point"][0], pwd="../libs/apnos/") - vif_config = list(ap_ssh.get_vif_config_ssids()) - vif_config.sort() - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - for ssid in ssid_names: - test_cases[ssid] = dict() - test_cases[ssid]["vif_config"] = True if ssid in vif_config else False - test_cases[ssid]["vif_state"] = True if ssid in vif_state else False - ssid_names.sort() - if vif_config == ssid_names == vif_state: - print("Waiting for Radios to apply config ") - time.sleep(200) - break - time.sleep(10) - allure.attach(body=str(vif_config), name="vifC status on AP :: ") - allure.attach(body=str(vif_state), name="vifS status on AP :: ") - - yield test_cases - - -@pytest.fixture(scope="session") -def passpoint_radius_server_info(): - allure.attach(body=str(PASSPOINT_RADIUS_SERVER_DATA), name="Passpoint RADIUS server Info: ") - yield PASSPOINT_RADIUS_SERVER_DATA - - -@pytest.fixture(scope="session") -def passpoint_radius_accounting_server_info(): - allure.attach(body=str(PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA), name="Passpoint RADIUS account server Info: ") - yield PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA - - -@pytest.fixture(scope="session") -def passpoint_provider_info(): - allure.attach(body=str(PASSPOINT_PROVIDER_INFO), name="Passpoint Provider Info: ") - yield PASSPOINT_PROVIDER_INFO - - -@pytest.fixture(scope="session") -def passpoint_operator_info(): - allure.attach(body=str(PASSPOINT_OPERATOR_INFO), name="Passpoint operator Info: ") - yield PASSPOINT_OPERATOR_INFO - - -@pytest.fixture(scope="session") -def passpoint_venue_info(): - allure.attach(body=str(PASSPOINT_VENUE_INFO), name="Passpoint venue Info: ") - yield PASSPOINT_VENUE_INFO - - -@pytest.fixture(scope="session") -def passpoint_profile_info(): - allure.attach(body=str(PASSPOINT_PROFILE_INFO), name="Passpoint profile Info: ") - yield PASSPOINT_PROFILE_INFO diff --git a/tests/e2e/interOp/openroaming_test/android/test_OpenRoaming_BridgeMode.py b/tests/e2e/interOp/openroaming_test/android/test_OpenRoaming_BridgeMode.py deleted file mode 100644 index a4affcab4..000000000 --- a/tests/e2e/interOp/openroaming_test/android/test_OpenRoaming_BridgeMode.py +++ /dev/null @@ -1,340 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.openRoaming, pytest.mark.bridge] -# pytestmark = [pytest.mark.openRoaming] - - -from android_lib import closeApp, set_APconnMobileDevice_android, verify_APconnMobileDevice_Android, deleteOpenRoamingInstalledProfile, downloadInstallOpenRoamingProfile, verifyUploadDownloadSpeed_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -""" - EAP Passpoint Test: BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge" -""" - -setup_params_eap = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [ - {"ssid_name": "passpoint_profile_download", "appliedRadios": ["is2dot4GHz"]} - ], - "wpa2_eap": [ - {"ssid_name": "ssid_wpa2_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ], - "wpa2_only_eap": [ - {"ssid_name": "ssid_wpa2_only_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_only_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ] - } -} - -@allure.feature("BRIDGE MODE EAP PASSPOINT SETUP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_eap], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestOpenRoamingBridgeMode(object): - - @pytest.mark.wpa2_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_2g_WPA2_EAP(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_android): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_eap and twog" - """ - - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_config'] - print(result) - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - profileDownloadURL = "https://onboard.almondlabs.net/ttls/androidconfig.cfg" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_android, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_android, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_android, downloadProfileSSID, connData) - - try: - verify_APconnMobileDevice_Android(request, profileNameSSID, setup_perfectoMobile_android, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - - @pytest.mark.wpa2_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_5g_WPA2_EAP(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_android): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_eap and fiveg" - """ - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - profileDownloadURL = "https://onboard.almondlabs.net/ttls/androidconfig.cfg" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_android, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_android, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_android, downloadProfileSSID, connData) - - try: - verify_APconnMobileDevice_Android(request, profileName, setup_perfectoMobile_android, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_2g(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_android): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_only_eap and twog" - """ - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/androidconfig.cfg" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - #ForgetWifi - #ForgetWifiConnection(request, setup_perfectoMobile_android, profileNameSSID, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_android, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_android, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_android, downloadProfileSSID, connData) - - try: - verify_APconnMobileDevice_Android(request, profileNameSSID, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_5g(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_android): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_only_eap and fiveg" - """ - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - profileDownloadURL = "https://onboard.almondlabs.net/ttls/androidconfig.cfg" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_android, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_android, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_android, downloadProfileSSID, connData) - - try: - verify_APconnMobileDevice_Android(request, profileNameSSID, setup_perfectoMobile_android, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_android, connData) diff --git a/tests/e2e/interOp/openroaming_test/iOS/conftest.py b/tests/e2e/interOp/openroaming_test/iOS/conftest.py deleted file mode 100644 index 04a34ccbe..000000000 --- a/tests/e2e/interOp/openroaming_test/iOS/conftest.py +++ /dev/null @@ -1,391 +0,0 @@ -import os -import sys - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f"../libs") - -import time -import pytest -import allure -from collections import defaultdict -from lanforge.lf_tests import RunTest -from configuration import PASSPOINT_RADIUS_SERVER_DATA -from configuration import PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA -from configuration import PASSPOINT_PROVIDER_INFO -from configuration import PASSPOINT_OPERATOR_INFO -from configuration import PASSPOINT_VENUE_INFO -from configuration import PASSPOINT_PROFILE_INFO -from controller.controller_1x.controller import ProfileUtility - - -@allure.feature("PASSPOINT CONNECTIVITY SETUP") -@pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_ref, - instantiate_profile, get_markers, passpoint_provider_info, passpoint_operator_info, - passpoint_venue_info, passpoint_profile_info, - get_configuration, passpoint_radius_server_info, passpoint_radius_accounting_server_info, get_apnos): - instantiate_profile = instantiate_profile(sdk_client=setup_controller) - vlan_id, mode = 0, 0 - instantiate_profile.cleanup_objects() - parameter = dict(request.param) - test_cases = {} - profile_data = {} - if parameter["mode"] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter["mode"]) - allure.attach(body=parameter["mode"], name="Invalid Mode: ") - yield test_cases - - if parameter["mode"] == "NAT": - mode = "NAT" - vlan_id = 1 - if parameter["mode"] == "BRIDGE": - mode = "BRIDGE" - vlan_id = 1 - if parameter["mode"] == "VLAN": - mode = "BRIDGE" - vlan_id = setup_vlan - - ap_profile = testbed + "-Equipment-AP-Passpoint" - instantiate_profile.delete_profile_by_name(profile_name=ap_profile) - profile_data["equipment_ap"] = {"profile_name": ap_profile} - - profile_data["ssid"] = {} - # Only passpoint SSID need to be applied with passpoint profiles leaving ssid used for - # profile download - passpoint_profile_download - profile_data["allowed_ssids"] = [] - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - profile_name = testbed + "-SSID-" + i + "-" + str(j) + "-" + parameter["mode"] - data = parameter["ssid_modes"][i][j] - data["profile_name"] = profile_name - if "mode" not in dict(data).keys(): - data["mode"] = mode - if "vlan" not in dict(data).keys(): - data["vlan"] = vlan_id - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - profile_data["ssid"][i].append(data) - - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode) - time.sleep(10) - - # RF Profile Creation - rf_profile_data = { - "name": testbed + "-RF-Profile-" + parameter["mode"] + "-" + get_configuration["access_point"][0]["mode"] - } - try: - instantiate_profile.delete_profile_by_name(profile_name=rf_profile_data["name"]) - rf_profile_data = instantiate_profile.set_rf_profile(profile_data=rf_profile_data, - mode=get_configuration["access_point"][0]["mode"]) - allure.attach(body=str(rf_profile_data), - name="RF Profile Created : " + get_configuration["access_point"][0]["mode"]) - except Exception as e: - print(e) - allure.attach(body=str(e), name="Exception ") - - # Radius Profile Creation - passpoint_radius_server_info = passpoint_radius_server_info - passpoint_radius_server_info["name"] = testbed + "-Automation-Radius-Profile" - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile") - try: - instantiate_profile.create_radius_profile(radius_info=passpoint_radius_server_info, - radius_accounting_info=passpoint_radius_accounting_server_info) - test_cases["radius_profile"] = True - allure.attach(body=str(passpoint_radius_server_info), name="Radius Profile Created") - except Exception as e: - print(e) - test_cases["radius_profile"] = False - - # SSID Profile Creation - for mode in profile_data["ssid"]: - if mode == "open": - for j in profile_data["ssid"][mode]: - try: - if "is2dot4GHz" in list(j["appliedRadios"]): - creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["wpa_eap_5g"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa2_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_eap_passpoint_ssid_profile(profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - if mode == "wpa2_only_eap": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_only_eap_passpoint_ssid_profile( - profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - try: - if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list( - j["appliedRadios"]): - creates_profile = instantiate_profile.create_wpa2_only_eap_passpoint_ssid_profile( - profile_data=j) - profile_data["allowed_ssids"].append(creates_profile._id) - test_cases[j["ssid_name"]] = {"sdk": True} - allure.attach(body=str(creates_profile), name="SSID Profile Created") - except Exception as e: - print(e) - test_cases[j["ssid_name"]] = {"sdk": False} - allure.attach(body=str(e), name="SSID Profile Creation Failed") - - # Passpoint OSU ID provider profile creation - passpoint_provider_info = passpoint_provider_info - test_cases["passpoint_osu_id_provider"] = dict() - profile_name = testbed + "-Automation-Passpoint-OSU-ID-Provider-Profile" - passpoint_provider_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_osu_id_provider_profile( - profile_data=passpoint_provider_info) - allure.attach(body=str(creates_profile), name="Passpoint OSU ID provider Profile Created") - test_cases["passpoint_osu_id_provider"] = {"sdk": True} - except Exception as e: - print(e) - test_cases["passpoint_osu_id_provider"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint OSU ID provider Profile Creation Failed") - - # Passpoint operator profile creation - test_cases["passpoint_operator_profile"] = dict() - passpoint_operator_info = passpoint_operator_info - profile_name = testbed + "-Automation-Passpoint-Operator-Profile" - passpoint_operator_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_operator_profile(profile_data=passpoint_operator_info) - allure.attach(body=str(creates_profile), name="Passpoint Operator Profile Created") - test_cases["passpoint_operator_profile"] = {"sdk": True} - profile_data["passpoint_operator"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint_operator_profile"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Operator Profile Creation Failed") - - # Passpoint Venue profile creation - passpoint_venue_info = passpoint_venue_info - test_cases["passpoint_venue_profile"] = dict() - profile_name = testbed + "-Automation-Passpoint-Venue-Profile" - passpoint_venue_info["profile_name"] = profile_name - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_venue_profile(profile_data=passpoint_venue_info) - allure.attach(body=str(creates_profile), name="Passpoint Venue Profile Created") - test_cases["passpoint_venue_profile"] = {"sdk": True} - profile_data["passpoint_venue"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint_venue"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Venue Profile Creation Failed") - - # Passpoint profile creation - passpoint_profile_info = passpoint_profile_info - profile_name = testbed + "-Automation-Passpoint-Profile" - passpoint_profile_info["profile_name"] = profile_name - passpoint_profile_info["allowed_ssids"] = profile_data["allowed_ssids"] - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - try: - creates_profile = instantiate_profile.create_passpoint_profile(profile_data=passpoint_profile_info) - allure.attach(body=str(creates_profile), name="Passpoint Profile Created") - test_cases["passpoint"] = {"sdk": True} - profile_data["passpoint"] = profile_name - except Exception as e: - print(e) - test_cases["passpoint"] = {"sdk": False} - allure.attach(body=str(e), name="Passpoint Profile Creation Failed") - - # Update SSID profile with passpoint config - passpoint_profile_info = passpoint_profile_info - ssid_to_apply = None - for ssid_profile in profile_data["ssid"].keys(): - for ssid in profile_data["ssid"][ssid_profile]: - if ssid["ssid_name"] == "passpoint_profile_download": - ssid_to_apply = ssid["ssid_name"] - continue - if ssid["ssid_name"] in test_cases.keys(): - allure.attach(body=str(ssid), name="Updating SSID profile") - passpoint_profile_info["ssid_profile_name"] = ssid["profile_name"] - instantiate_profile.update_ssid_profile(profile_info=passpoint_profile_info) - - # Equipment AP Profile Creation - ap_profile_info = dict() - ap_profile_info["profile_name"] = profile_data["equipment_ap"]["profile_name"] - ap_profile_info["ssid_names"] = [ssid_to_apply] - try: - instantiate_profile.set_ap_profile_custom(profile_data=ap_profile_info) - test_cases["equipment_ap"] = {"sdk": True} - allure.attach(body=str(profile_data["equipment_ap"]), name="Equipment AP Profile Created") - except Exception as e: - print(e) - test_cases["equipment_ap"] = {"sdk": False} - allure.attach(body=str(e), name="Equipment AP Profile Creation Failed") - - - def teardown_session(): - print("\nRemoving Profiles") - instantiate_profile.delete_profile_by_name(profile_name=profile_data['equipment_ap']['profile_name']) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["ssid"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["radius"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["rf"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_osu_id_provider"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_operator"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint_venue"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["passpoint"]) - allure.attach(body=str(profile_data['equipment_ap']['profile_name'] + "\n"), - name="Tear Down in Profiles ") - time.sleep(20) - - request.addfinalizer(teardown_session) - yield test_cases, instantiate_profile, profile_data - - -@pytest.fixture(scope="function") -def push_ap_profile(request, setup_profiles, get_equipment_ref, get_apnos, get_configuration): - parameter = dict(request.param) - test_cases, instantiate_profile, profile_data = setup_profiles - ssid_names = parameter["ssid_names"] - ap_profile_info = dict() - ap_profile_info["profile_name"] = profile_data["equipment_ap"]["profile_name"] - test_cases = {} - ap_profile_info["ssid_names"] = ssid_names - try: - instantiate_profile.update_ap_profile(profile_data=ap_profile_info) - test_cases["equipment_ap"] = {"sdk": True} - allure.attach(body=str(ap_profile_info["profile_name"]), name="Equipment AP Profile Updated") - except Exception as e: - print(e) - test_cases["equipment_ap"] = {"sdk": False} - allure.attach(body=str(e), name="Equipment AP Profile Update Failed") - - print("Pushing profiles on AP :: ", ap_profile_info) - allure.attach(body=str(ap_profile_info), name="Pushing profiles on AP :: ") - # Push the Equipment AP Profile to AP - try: - for i in get_equipment_ref: - instantiate_profile.push_profile_old_method(equipment_id=i) - except Exception as e: - print(e) - print("failed to push AP Profile") - - # Check the VIF Config and VIF State of SSIDs - time_start = time.time() - ap_ssh = get_apnos(get_configuration["access_point"][0], pwd="../libs/apnos/") - while time.time() - time_start < 240: - if ((time.time() - time_start) / 10) == 15: - ap_ssh = get_apnos(get_configuration["access_point"][0], pwd="../libs/apnos/") - vif_config = list(ap_ssh.get_vif_config_ssids()) - vif_config.sort() - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - for ssid in ssid_names: - test_cases[ssid] = dict() - test_cases[ssid]["vif_config"] = True if ssid in vif_config else False - test_cases[ssid]["vif_state"] = True if ssid in vif_state else False - ssid_names.sort() - if vif_config == ssid_names == vif_state: - print("Waiting for Radios to apply config ") - time.sleep(200) - break - time.sleep(10) - allure.attach(body=str(vif_config), name="vifC status on AP :: ") - allure.attach(body=str(vif_state), name="vifS status on AP :: ") - - yield test_cases - - -@pytest.fixture(scope="session") -def passpoint_radius_server_info(): - allure.attach(body=str(PASSPOINT_RADIUS_SERVER_DATA), name="Passpoint RADIUS server Info: ") - yield PASSPOINT_RADIUS_SERVER_DATA - - -@pytest.fixture(scope="session") -def passpoint_radius_accounting_server_info(): - allure.attach(body=str(PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA), name="Passpoint RADIUS account server Info: ") - yield PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA - - -@pytest.fixture(scope="session") -def passpoint_provider_info(): - allure.attach(body=str(PASSPOINT_PROVIDER_INFO), name="Passpoint Provider Info: ") - yield PASSPOINT_PROVIDER_INFO - - -@pytest.fixture(scope="session") -def passpoint_operator_info(): - allure.attach(body=str(PASSPOINT_OPERATOR_INFO), name="Passpoint operator Info: ") - yield PASSPOINT_OPERATOR_INFO - - -@pytest.fixture(scope="session") -def passpoint_venue_info(): - allure.attach(body=str(PASSPOINT_VENUE_INFO), name="Passpoint venue Info: ") - yield PASSPOINT_VENUE_INFO - - -@pytest.fixture(scope="session") -def passpoint_profile_info(): - allure.attach(body=str(PASSPOINT_PROFILE_INFO), name="Passpoint profile Info: ") - yield PASSPOINT_PROFILE_INFO diff --git a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_BridgeMode.py b/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_BridgeMode.py deleted file mode 100644 index 86d9c7cbe..000000000 --- a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_BridgeMode.py +++ /dev/null @@ -1,326 +0,0 @@ -""" - EAP Passpoint BRIDGE Mode - Run wpa2_eap & Run wpa2_only_eap: - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_eap and bridge" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_eap and bridge" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_only_eap and bridge" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_only_eap and bridge" -s -vvv --testbed interop --skip-upgrade - Run all: - pytest -m "openRoaming and interop_ios and bridge" -s -vvv --testbed interop --skip-upgrade --skip-testrail --collect-only -""" - -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.openRoaming, pytest.mark.bridge] -# pytestmark = [pytest.mark.openRoaming] - -from iOS_lib import closeApp, openApp, ForgetProfileWifiConnection, deleteOpenRoamingInstalledProfile, verifyUploadDownloadSpeediOS, downloadInstallOpenRoamingProfile, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_eap = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [ - {"ssid_name": "passpoint_profile_download", "appliedRadios": ["is2dot4GHz"]} - ], - "wpa2_eap": [ - {"ssid_name": "ssid_wpa2_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ], - "wpa2_only_eap": [ - {"ssid_name": "ssid_wpa2_only_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_only_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ] - } -} - -@allure.feature("BRIDGE MODE EAP PASSPOINT SETUP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_eap], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestOpenRoamingBridge(object): - - @pytest.mark.wpa2_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_2g_WPA2_EAP_BRIDGE(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_5g_WPA2_EAP_BRIDGE(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_2g_BRIDGE(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_5g_BRIDGE(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) diff --git a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_NatMode.py b/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_NatMode.py deleted file mode 100644 index de1fe2b11..000000000 --- a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_NatMode.py +++ /dev/null @@ -1,356 +0,0 @@ -""" - EAP Passpoint NAT Mode - Run wpa2_eap: - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_eap and nat" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_eap and nat" -s -vvv --testbed interop --skip-upgrade - Run wpa2_only_eap: - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_only_eap and nat" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_only_eap and nat" -s -vvv --testbed interop --skip-upgrade - Run all: - pytest -m "OpenRoaming and interop_ios and nat" -s -vvv --testbed interop --skip-upgrade -""" - -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.openRoaming, pytest.mark.nat] -# pytestmark = [pytest.mark.openRoaming] - -from iOS_lib import closeApp, openApp, ForgetProfileWifiConnection, deleteOpenRoamingInstalledProfile, verifyUploadDownloadSpeediOS, downloadInstallOpenRoamingProfile, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_eap = { - "mode": "NAT", - "ssid_modes": { - "open": [ - {"ssid_name": "passpoint_profile_download", "appliedRadios": ["is2dot4GHz"]} - ], - "wpa2_eap": [ - {"ssid_name": "ssid_wpa2_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ], - "wpa2_only_eap": [ - {"ssid_name": "ssid_wpa2_only_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_only_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ] - } -} - -@allure.feature("NAT MODE EAP PASSPOINT SETUP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_eap], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestOpenRoamingNAT(object): - - @pytest.mark.wpa2_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_2g_WPA2_EAP_NAT(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - - @pytest.mark.wpa2_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_5g_WPA2_EAP_NAT(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #ForgetProfileWifiConnection(request, setup_perfectoMobile_iOS, profileNameSSID, connData) - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - - @pytest.mark.wpa2_only_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_2g_NAT(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_only_eap and twog" - """ - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - - - @pytest.mark.wpa2_only_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_5g_NAT(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - """ - EAP Passpoint BRIDGE Mode - pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_only_eap and fiveg" - """ - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) diff --git a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_vlan_mode.py b/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_vlan_mode.py deleted file mode 100644 index 8868a8954..000000000 --- a/tests/e2e/interOp/openroaming_test/iOS/test_OpenRoaming_vlan_mode.py +++ /dev/null @@ -1,326 +0,0 @@ -""" - EAP Passpoint VLAN Mode - Run wpa2_eap & Run wpa2_only_eap: - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_eap and vlan" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_eap and vlan" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and fiveg and wpa2_only_eap and vlan" -s -vvv --testbed interop --skip-upgrade - pytest -m "OpenRoaming and interop_ios and twog and wpa2_only_eap and vlan" -s -vvv --testbed interop --skip-upgrade - Run all: - pytest -m "openRoaming and interop_ios and vlan" -s -vvv --testbed interop --skip-upgrade --skip-testrail --collect-only -""" - -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.openRoaming, pytest.mark.vlan] -# pytestmark = [pytest.mark.openRoaming] - -from iOS_lib import closeApp, openApp, ForgetProfileWifiConnection, deleteOpenRoamingInstalledProfile, verifyUploadDownloadSpeediOS, downloadInstallOpenRoamingProfile, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_eap = { - "mode": "VLAN", - "ssid_modes": { - "open": [ - {"ssid_name": "passpoint_profile_download", "appliedRadios": ["is2dot4GHz"]} - ], - "wpa2_eap": [ - {"ssid_name": "ssid_wpa2_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ], - "wpa2_only_eap": [ - {"ssid_name": "ssid_wpa2_only_eap_passpoint_2g", "appliedRadios": ["is2dot4GHz"]}, - {"ssid_name": "ssid_wpa2_only_eap_passpoint_5g", "appliedRadios": ["is5GHz"]} - ] - } -} - -@allure.feature("VLAN MODE EAP PASSPOINT SETUP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_eap], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestOpenRoamingBridgeVLAN(object): - - @pytest.mark.wpa2_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_2g_WPA2_EAP_VLAN(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_5g_WPA2_EAP_VLAN(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Setting Perfecto ReportClient.... - #SSID to download profile :: passpoint_profile_download - #SSID to validate connectivity :: ssid_wpa2_eap_passpoint_5g - #Profile download URL :: https://onboard.almondlabs.net/ios.html - #Profile name to remove :: AmeriBand - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.twog - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_2g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_2g_VLAN(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_2g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_2g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][0]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - @pytest.mark.wpa2_only_eap - @pytest.mark.fiveg - @pytest.mark.parametrize( - 'push_ap_profile', - [{"ssid_names": ["ssid_wpa2_only_eap_passpoint_5g", "passpoint_profile_download"]}], - indirect=True, - scope="function" - ) - @pytest.mark.usefixtures("push_ap_profile") - def test_OpenRoaming_wpa2_only_eap_5g_VLAN(self, passpoint_profile_info, push_ap_profile, request, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_config'] - if result: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config push to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - result = push_ap_profile['ssid_wpa2_only_eap_passpoint_5g']['vif_state'] - if result: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g successful ", body="") - else: - allure.attach(name="Config apply to AP for ssid_wpa2_only_eap_passpoint_5g failed", body="") - pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") - assert result - - print("SSID to download profile :: ", setup_params_eap["ssid_modes"]["open"][0]["ssid_name"]) - print("SSID to validate connectivity :: ", setup_params_eap["ssid_modes"]["wpa2_only_eap"][1]["ssid_name"]) - print("Profile download URL :: ", passpoint_profile_info["profile_download_url_ios"]) - print("Profile name to remove :: ", passpoint_profile_info["profile_name_on_device"]) - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0]["ssid_name"] - downloadProfileSSIDPass = "" - #profileDownloadURL = passpoint_profile_info["profile_download_url_ios"] - profileDownloadURL = "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig" - profileName = passpoint_profile_info["profile_name_on_device"] - profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1]["ssid_name"] - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, downloadProfileSSID, downloadProfileSSIDPass, setup_perfectoMobile_iOS, connData) - - #Install Profile - downloadInstallOpenRoamingProfile(request, profileDownloadURL, setup_perfectoMobile_iOS, connData) - - #ForgetWifi Original - ForgetWifiConnection(request, setup_perfectoMobile_iOS, downloadProfileSSID, connData) - - try: - assert verify_APconnMobileDevice_iOS(request, profileNameSSID, setup_perfectoMobile_iOS, connData) - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - except Exception as e: - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) - assert False - - #Delete Profile Under Settings - deleteOpenRoamingInstalledProfile(request, profileName, setup_perfectoMobile_iOS, connData) diff --git a/tests/e2e/interOp/openroaming_test/test_openroaming_bridge.py b/tests/e2e/interOp/openroaming_test/test_openroaming_bridge.py new file mode 100644 index 000000000..bed3736e8 --- /dev/null +++ b/tests/e2e/interOp/openroaming_test/test_openroaming_bridge.py @@ -0,0 +1,52 @@ +""" + Dummy Testcase for checking + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and enterprise" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.open_roaming, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise_two_br = { + "mode": "BRIDGE", + "ssid_modes": { + "open": [{"ssid_name": "pass_point", "appliedRadios": ["5G"]}], + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "Meta_secure", "appliedRadios": ["5G"]}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] + }, + "rf": {}, + "radius": True +} +@allure.feature("BRIDGE MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_open_roaming_configuration', + [setup_params_enterprise_two_br], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_open_roaming_configuration") +class TestBridgeModeConnectSuiteTwo(object): + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_enterprise_mixed 5 GHZ Band') + @pytest.mark.usefixtures("setup_open_roaming_configuration") + @allure.title("BRIDGE Mode Client Connect Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="JIRA LINK") + def test_bridge_wpa_wpa2_eap_mixed_5g_client_connect(self, + num_stations, setup_open_roaming_configuration): + print("1.Config:", setup_open_roaming_configuration) + assert True \ No newline at end of file diff --git a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/test_PassPointConnection_BridgeMode.py b/tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/test_PassPointConnection_BridgeMode.py deleted file mode 100644 index a5ebaf4fc..000000000 --- a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/android/test_PassPointConnection_BridgeMode.py +++ /dev/null @@ -1,223 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.PassPointConnection] - -from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],"security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],"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") -class TestPassPointConnectionBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_PassPointConnection_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_PassPointConnection_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_PassPointConnection_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_PassPointConnection_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.fiveg - def test_PassPointConnection_5g_Open_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_PassPointConnection_2g_Open_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - diff --git a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/test_PassPointConnection_BridgeMode.py b/tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/test_PassPointConnection_BridgeMode.py deleted file mode 100644 index c627882ac..000000000 --- a/tests/e2e/interOp/passpoint_connection_test/bridge_mode/iOS/test_PassPointConnection_BridgeMode.py +++ /dev/null @@ -1,235 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -from urllib3 import exceptions - -import sys -import allure - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.PassPointConnection] - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestPassPointConnectionBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_PassPointConnection_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_PassPointConnection_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b. - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App. - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.wpa - def test_PassPointConnection_2g_WPA_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_PassPointConnection_5g_WPA_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.fiveg - @pytest.mark.wpa2_open - def test_PassPointConnection_5g_OPEN_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.open - def test_PassPointConnection_2g_OPEN_BRIDGE(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b. - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App. - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) diff --git a/tests/e2e/interOp/passpoint_connection_test/nat_mode/android/test_PassPointConnection.py b/tests/e2e/interOp/passpoint_connection_test/nat_mode/android/test_PassPointConnection.py deleted file mode 100644 index 04b2183aa..000000000 --- a/tests/e2e/interOp/passpoint_connection_test/nat_mode/android/test_PassPointConnection.py +++ /dev/null @@ -1,223 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.PassPointConnection] - -from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],"security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],"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") -class TestPassPointConnection(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_PassPointConnection_5g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_PassPointConnection_2g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_PassPointConnection_5g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_PassPointConnection_2g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.fiveg - def test_PassPointConnection_5g_OPEN(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_PassPointConnection_2g_OPEN(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - diff --git a/tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/test_PassPointConnection.py b/tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/test_PassPointConnection.py deleted file mode 100644 index d832901b8..000000000 --- a/tests/e2e/interOp/passpoint_connection_test/nat_mode/iOS/test_PassPointConnection.py +++ /dev/null @@ -1,235 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -from urllib3 import exceptions - -import sys -import allure - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ios, pytest.mark.PassPointConnection] - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestPassPointConnection(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_PassPointConnection_5g_WPA2_Personal(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_PassPointConnection_2g_WPA2_Personal(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b. - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App. - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.wpa - def test_PassPointConnection_2g_WPA(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_PassPointConnection_5g_WPA(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.fiveg - @pytest.mark.open - def test_PassPointConnection_5g_OPEN(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - assert Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi. - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) - - @pytest.mark.twog - @pytest.mark.Open - def test_PassPointConnection_2g_OPEN(self, request, get_vif_state, setup_perfectoMobile_iOS, - get_PassPointConniOS_data): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_PassPointConniOS_data - - # Set Wifi Access Mode to #Default-SSID-5gl-perfecto-b/#Default-SSID-2gl-perfecto-b. - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle Airplane Mode and Ensure Wifi Connection. - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - # Close Settings App. - closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile_iOS) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/test_AccessPointConnection_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/test_AccessPointConnection_BridgeMode.py deleted file mode 100644 index a0cdfd260..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/android/test_AccessPointConnection_BridgeMode.py +++ /dev/null @@ -1,224 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, - pytest.mark.AccessPointConnection, pytest.mark.bridge] - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from android_lib import closeApp, verifyUploadDownloadSpeed_android, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestAcessPointConnectionBridge(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_AccessPointConnection_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_AccessPointConnection_2g_WPA2_Personal_Bridge(self,request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_AccessPointConnection_5g_WPA_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_AccessPointConnection_2g_WPA_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_AccessPointConnection_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/test_AccessPointConnection_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/test_AccessPointConnection_BridgeMode.py deleted file mode 100644 index 52c74fba7..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/access_point_connection_test/iOS/test_AccessPointConnection_BridgeMode.py +++ /dev/null @@ -1,247 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.AccessPointConnection] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestAccessPointConnectivetyBridge(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_AccessPointConnection_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_AccessPointConnection_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_AccessPointConnection_5g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_AccessPointConnection_2g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - @pytest.mark.test_AccessPointConnection_5g_OPEN_Bridge_ios - def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - @pytest.mark.test_AccessPointConnection_2g_OPEN_Bridge_ios - def test_AccessPointConnection_2g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py deleted file mode 100644 index 6c58f4291..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py +++ /dev/null @@ -1,213 +0,0 @@ -# from logging import exception -# import unittest -# import warnings -# from perfecto.test import TestResultFactory -# import pytest -# import sys -# import time -# from selenium.common.exceptions import NoSuchElementException -# from selenium.webdriver.common.by import By -# from appium import webdriver -# from selenium.common.exceptions import NoSuchElementException -# -# import sys -# import allure -# -# if 'perfecto_libs' not in sys.path: -# sys.path.append(f'../libs/perfecto_libs') -# -# pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, -# pytest.mark.ClientConnectivity] -# -# from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, \ -# Toggle_AirplaneMode_android, ForgetWifiConnection, openApp -# -# setup_params_general = { -# "mode": "BRIDGE", -# "ssid_modes": { -# "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, -# {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], -# "security_key": "something"}], -# "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, -# {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], -# "wpa2_personal": [ -# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, -# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], -# "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") -# class TestBridgeMode(object): -# -# @pytest.mark.fiveg -# @pytest.mark.wpa2_personal -# def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] -# ssidName = profile_data["ssid_name"] -# ssidPassword = profile_data["security_key"] -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) -# -# @pytest.mark.twog -# @pytest.mark.wpa2_personal -# def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] -# ssidName = profile_data["ssid_name"] -# ssidPassword = profile_data["security_key"] -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) -# -# @pytest.mark.twog -# @pytest.mark.wpa -# def test_ClientConnectivity_2g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# profile_data = setup_params_general["ssid_modes"]["wpa"][0] -# ssidName = profile_data["ssid_name"] -# ssidPassword = profile_data["security_key"] -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) -# -# @pytest.mark.fiveg -# @pytest.mark.wpa -# def test_ClientConnectivity_5g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# profile_data = setup_params_general["ssid_modes"]["wpa"][1] -# ssidName = profile_data["ssid_name"] -# ssidPassword = profile_data["security_key"] -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) -# -# @pytest.mark.twog -# @pytest.mark.open -# def test_ClientConnectivity_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# -# profile_data = setup_params_general["ssid_modes"]["open"][0] -# ssidName = profile_data["ssid_name"] -# ssidPassword = "[BLANK]" -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) -# -# @pytest.mark.fiveg -# @pytest.mark.open -# def test_ClientConnectivity_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, -# setup_perfectoMobile_android): -# -# profile_data = setup_params_general["ssid_modes"]["open"][1] -# ssidName = profile_data["ssid_name"] -# ssidPassword = "[BLANK]" -# print("SSID_NAME: " + ssidName) -# print("SSID_PASS: " + ssidPassword) -# -# if ssidName 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") -# -# report = setup_perfectoMobile_android[1] -# driver = setup_perfectoMobile_android[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) -# -# # Toggle AirplaneMode -# assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) -# -# # ForgetWifi -# ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py deleted file mode 100644 index 3cb603625..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,491 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ow_sanity_interop] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_eap_and - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -# class TestUniqueSSIDBridgeAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_bridge_and -# def test_unique_ssid_bridge_and(self): -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4836", name="WIFI-4836") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnect_5g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4835", name="WIFI-4835") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4838", name="WIFI-4838") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnect_5g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4837", name="WIFI-4837") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4840", name="WIFI-4840") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnect_5g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4839", name="WIFI-4839") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_enterprise_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDBridgeEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_bridge_and -# def test_unique_ssid_bridge_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-B") -@pytest.mark.suiteB -@pytest.mark.mixed_eap -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7410", name="WIFI-7410") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7409", name="WIFI-7409") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Bridge(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7412", name="WIFI-7412") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_enterprise_mixed_Bridge(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7412", name="WIFI-7412") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_enterprise_mixed_Bridge(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_general_security_modes.py deleted file mode 100644 index 109ae9e4c..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_general_security_modes.py +++ /dev/null @@ -1,571 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.ow_sanity_interop] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralBridgeAnd(object): -# -# @pytest.mark.unique_ssid_general_one_bridge_and -# def test_unique_ssid_general_one_bridge_and(self): -# for sec_modes in setup_params_general['ssid_modes'].keys(): -# for i in range(len(setup_params_general['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4570", name="WIFI-4570") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4569", name="WIFI-4569") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4568", name="WIFI-4568") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4567", name="WIFI-4567") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4566", name="WIFI-4566") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #Toggle AirplaneMode - # assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="WIFI-4565") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralTwoBridgeAnd(object): -# -# @pytest.mark.unique_ssid_general_two_bridge_and -# def test_unique_ssid_general_two_bridge_and(self): -# for sec_modes in setup_params_general_two['ssid_modes'].keys(): -# for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# -# assert True - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="WIFI-4572") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4571", name="WIFI-4571") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4574", name="WIFI-4574") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4573", name="WIFI-4573") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4576", name="WIFI-4576") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4575", name="WIFI-4575") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 121667e56..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,503 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ow_sanity_interop] - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - -# class TestUniqueSSIDEnterpriseBridgeIOS(object): -# -# @pytest.mark.unique_ssid_enterprise_bridge_ios -# def test_unique_ssid_enterprise_bridge_ios(self): -# for sec_modes in setup_params_enterprise['ssid_modes'].keys(): -# for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4691", name="WIFI-4691") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4690", name="WIFI-4690") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4695", name="WIFI-4695") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4694", name="WIFI-4694") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4693", name="WIFI-4693") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4692", name="WIFI-4692") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_enterprise_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_mixed_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa3_mixed_eap_5g", "appliedRadios": ["5G"]}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDBridgeEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_bridge_and -# def test_unique_ssid_bridge_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connect : Suite-B") -@pytest.mark.suiteB -@pytest.mark.mixed_eap -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7414", name="WIFI-7414") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_eap_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7413", name="WIFI-7413") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_eap_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7416", name="WIFI-7416") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_eap_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7415", name="WIFI-7415") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_eap_mixed_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info["user"] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py deleted file mode 100644 index aab85e3f6..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,558 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connect, pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.ow_sanity_interop] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralOneBridgeIOS(object): -# -# @pytest.mark.unique_ssid_general_one_bridge_ios -# def test_unique_ssid_general_one_bridge_ios(self): -# for sec_modes in setup_params_general['ssid_modes'].keys(): -# for i in range(len(setup_params_general['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4545", name="WIFI-4545") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4490", name="WIFI-4490") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4489", name="WIFI-4489") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4488", name="WIFI-4488") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4487", name="WIFI-4487") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #Toggle AirplaneMode - # assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4486", name="WIFI-4486") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -# class TestUniqueSSIDGeneralTwoBridgeios(object): -# -# @pytest.mark.unique_ssid_general_two_bridge_ios -# def test_unique_ssid_general_two_bridge_ios(self): -# for sec_modes in setup_params_general_two['ssid_modes'].keys(): -# for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# -# assert True - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4547", name="WIFI-4547") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4546", name="WIFI-4546") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4549", name="WIFI-4549") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4548", name="WIFI-4548") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4551", name="WIFI-4551") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4550", name="WIFI-4550") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_enterprise_ttls.py new file mode 100644 index 000000000..df66795e3 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_enterprise_ttls.py @@ -0,0 +1,330 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and enterprise" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ow_sanity_interop] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("BRIDGE MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeConnectSuiteA(object): + """ + Bridge Client Connect (wpa. wpa2. wpa3) (twog, fiveg) + pytest -m "client_connect_tests and bridge and enterprise" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.title("BRIDGE Mode Client Connect Test for wpa enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_bridge_wpa_eap_2g_client_connect(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + #security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.title("BRIDGE Mode Client Connect Test for wpa enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4566", name="JIRA LINK") + def test_bridge_wpa_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + #security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.title("BRIDGE Mode Client Connect Test for wpa2 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4567", name="JIRA LINK") + def test_bridge_wpa2_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and bridge and enterprise and wpa and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.title("BRIDGE Mode Client Connect Test Test for wpa2 enterprise 5 GHzd") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4568", name="JIRA LINK") + def test_bridge_wpa2_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.title("BRIDGE Mode Client Connect Test for wpa3 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4569", name="JIRA LINK") + def test_bridge_wpa3_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa2_personal and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.title("BRIDGE Mode Client Connect Test for wpa3 enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4570", name="JIRA LINK") + def test_bridge_wpa3_eap_5g_client_connect(self, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, setup_configuration, get_test_library, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa2_personal and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + assert passes == "PASS", result + + +setup_params_enterprise_two_br = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] + }, + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise_two_br['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_br['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise_two_br['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise_two_br['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("BRIDGE MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_br], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect_tests and bridge and suiteB" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7410", name="JIRA LINK") + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_enterprise_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa_wpa2_enterprise_mixed encryption 2.4 GHz Band") + def test_bridge_wpa_wpa2_eap_mixed_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa_wpa2_enterprise_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa_wpa2_enterprise_mixed and twog" + """ + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_enterprise_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="JIRA LINK") + def test_bridge_wpa_wpa2_eap_mixed_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa_wpa2_enterprise_mixed and fiveg" + """ + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_enterprise_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4573", name="JIRA LINK") + def test_bridge_wpa3_eap_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa3_enterprise_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa3_enterprise_mixed and twog" + """ + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_enterprise_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4574", name="JIRA LINK") + def test_bridge_wpa3_eap_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa3_enterprise_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and enterprise and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + #security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_general_security_modes.py new file mode 100644 index 000000000..f99414697 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/test_general_security_modes.py @@ -0,0 +1,373 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.bridge, pytest.mark.general, pytest.mark.ow_sanity_interop] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "open": [{"ssid_name": "open_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "open_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa": [{"ssid_name": "wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("BRIDGE MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeConnectSuiteA(object): + """ + Bridge Client Connect (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connect_tests and bridge and general" + """ + + @pytest.mark.open + @pytest.mark.twog + @pytest.mark.general_securtiy + @allure.story('OPEN 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_bridge_open_2g_client_connect(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Client Connect Test with open encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and open and twog" + """ + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @pytest.mark.general_securtiy + @allure.story('OPEN 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4566", name="JIRA LINK") + def test_bridge_open_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with open encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and open and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + + @pytest.mark.wpa + @pytest.mark.twog + @pytest.mark.general_securtiy + @allure.story('wpa 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4567", name="JIRA LINK") + def test_bridge_wpa_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @pytest.mark.general_securtiy + @allure.story('wpa 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4568", name="JIRA LINK") + def test_bridge_wpa_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.general_securtiy + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4569", name="JIRA LINK") + def test_bridge_wpa2_personal_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + # + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.general_securtiy + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4570", name="JIRA LINK") + def test_bridge_wpa2_personal_5g_client_connect(self, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + +setup_params_general_two_br = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "wpa3_p_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa3_p_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "wpa3_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa3_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "wpa_wpa2_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa_wpa2_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general_two_br['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_br['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general_two_br['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general_two_br['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("BRIDGE MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_br], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect_tests and bridge and suiteB" + """ + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4571", name="JIRA LINK") + def test_bridge_wpa3_personal_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa3_personal and twog" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="JIRA LINK") + def test_bridge_wpa3_personal_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4573", name="JIRA LINK") + def test_bridge_wpa3_personal_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa3_personal_mixed and twog" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4574", name="JIRA LINK") + def test_bridge_wpa3_personal_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4575", name="JIRA LINK") + def test_bridge_wpa_wpa2_personal_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa wpa2 personal mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Client ConnectTest with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4576", name="JIRA LINK") + def test_bridge_wpa_wpa2_personal_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + BRIDGE Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and bridge and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_br["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py deleted file mode 100644 index 4c2bb3817..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,300 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_eap_and, verifyUploadDownloadSpeed_android, wifi_connect_eap, wifi_disconnect_and_forget - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4665", name="WIFI-4665") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_5g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4664", name="WIFI-4664") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4667", name="WIFI-4667") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_5g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4666", name="WIFI-4666") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4669", name="WIFI-4669") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_5g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4668", name="WIFI-4668") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_general_security_modes.py deleted file mode 100644 index e3a9110ce..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/android/test_general_security_modes.py +++ /dev/null @@ -1,581 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectivitySuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connectivity and bridge and InteropsuiteA" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4584", name="WIFI-4584") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4582", name="WIFI-4582") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4580", name="WIFI-4580") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4579", name="WIFI-4579") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4578", name="WIFI-4578") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4577", name="WIFI-4577") - @pytest.mark.twog - @pytest.mark.open - @pytest.mark.test_ClientConnectivity_2g_Open_and - def test_ClientConnectivity_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectivitySuiteTwo(object): - """ Client Connect SuiteB - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4587", name="WIFI-4587") - @pytest.mark.wpa3_personal - @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_2g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4588", name="WIFI-4588") - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_5g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4589", name="WIFI-4589") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_2g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4590", name="WIFI-4590") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_5g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4591", name="WIFI-4591") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.twog - @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_2g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4592", name="WIFI-4592") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.fiveg - @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_5g_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_BridgeMode.py deleted file mode 100644 index deca0c8be..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_BridgeMode.py +++ /dev/null @@ -1,212 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ClientConnectivity] - -from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, \ - set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index a84daf6a9..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,309 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.bridge, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and bridge and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4711", name="WIFI-4711") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword,setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4710", name="WIFI-4710") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4715", name="WIFI-4715") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4714", name="WIFI-4714") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4613", name="WIFI-4613") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword,setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4612", name="WIFI-4612") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py deleted file mode 100644 index efaa7fd8d..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connectivity_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,529 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connectivity, pytest.mark.interop_uc_sanity, pytest.mark.bridge] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectivitySuiteOneBridge(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4557", name="WIFI-4557") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4556", name="WIFI-4556") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4555", name="WIFI-4555") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4554", name="WIFI-4554") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4553", name="WIFI-4553") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4552", name="WIFI-4552") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectivitySuiteBridgeTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4559", name="WIFI-4559") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnectivity_5g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4558", name="WIFI-4558") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnectivity_2g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4561", name="WIFI-4561") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_5g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4560", name="WIFI-4560") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_2g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4563", name="WIFI-4563") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_5g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4562", name="WIFI-4562") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_2g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py deleted file mode 100644 index 40329eeed..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py +++ /dev/null @@ -1,1711 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7300", name="WIFI-7300") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7302", name="WIFI-7302") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_40Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_40Mhz.py deleted file mode 100644 index 5636e2bec..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_40Mhz.py +++ /dev/null @@ -1,1148 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7303", name="WIFI-7303") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7301", name="WIFI-7301") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_80Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_80Mhz.py deleted file mode 100644 index 76fb5ee93..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_80Mhz.py +++ /dev/null @@ -1,1020 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7684", name="WIFI-7684") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_20MHZ.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_20MHZ.py deleted file mode 100644 index a6e2d03c9..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_20MHZ.py +++ /dev/null @@ -1,1729 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7644", name="WIFI-7644") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7657", name="WIFI-7657") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_40mhz.py deleted file mode 100644 index 91f7e1a63..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_40mhz.py +++ /dev/null @@ -1,1166 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7662", name="WIFI-7662") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7645", name="WIFI-7645") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_80mhz.py deleted file mode 100644 index 64d5e4f6d..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/iOS/test_80mhz.py +++ /dev/null @@ -1,1028 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_CA, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7667", name="WIFI-7667") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7667", name="WIFI-7667") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7667", name="WIFI-7667") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7667", name="WIFI-7667") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'CA', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7646", name="WIFI-7646") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_20mhz.py deleted file mode 100644 index 23b8293df..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_20mhz.py +++ /dev/null @@ -1,1705 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7310", name="WIFI-7310") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7312", name="WIFI-7312") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_40mhz.py deleted file mode 100644 index c7b0b4586..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_40mhz.py +++ /dev/null @@ -1,1148 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - @pytest.mark.runfirst - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7313", name="WIFI-7313") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7311", name="WIFI-7311") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_80mhz.py deleted file mode 100644 index b29c1d542..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/android/test_GB_80mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7314", name="WIFI-7314") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7314", name="WIFI-7314") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7314", name="WIFI-7314") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7314", name="WIFI-7314") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7640", name="WIFI-7640") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_20mhz.py deleted file mode 100644 index 904e372e2..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_20mhz.py +++ /dev/null @@ -1,1728 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_CA_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7653", name="WIFI-7653") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7660", name="WIFI-7660") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_40mhz.py deleted file mode 100644 index 41b0c3537..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_40mhz.py +++ /dev/null @@ -1,1166 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7665", name="WIFI-7665") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7654", name="WIFI-7654") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_80mhz.py deleted file mode 100644 index 7540925f9..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_GB/iOS/test_GB_80mhz.py +++ /dev/null @@ -1,1028 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_GB, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7670", name="WIFI-7670") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7670", name="WIFI-7670") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7670", name="WIFI-7670") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7670", name="WIFI-7670") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_GB_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'GB', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(GB)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE GB") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7655", name="WIFI-7655") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_GB_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_20Mhz.py deleted file mode 100644 index eadf12766..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_20Mhz.py +++ /dev/null @@ -1,1707 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7295", name="WIFI-7295") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(CA)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE CA") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7297", name="WIFI-7297") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_40Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_40Mhz.py deleted file mode 100644 index f03867b74..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_40Mhz.py +++ /dev/null @@ -1,1155 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - @pytest.mark.plott - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7296", name="WIFI-7296") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7298", name="WIFI-7298") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_80Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_80Mhz.py deleted file mode 100644 index 78e8defd7..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/android/test_IN_80Mhz.py +++ /dev/null @@ -1,1018 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7299", name="WIFI-7299") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7299", name="WIFI-7299") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7299", name="WIFI-7299") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7299", name="WIFI-7299") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7638", name="WIFI-7638") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_20mhz.py deleted file mode 100644 index 6e48a9f69..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_20mhz.py +++ /dev/null @@ -1,1729 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7647", name="WIFI-7647") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7658", name="WIFI-7658") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_40mhz.py deleted file mode 100644 index e01b83b34..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_40mhz.py +++ /dev/null @@ -1,1166 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI--7663", name="WIFI--7663") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_80mhz.py deleted file mode 100644 index 9f56ccfda..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_IN/iOS/test_IN_80mhz.py +++ /dev/null @@ -1,1028 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_IN, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7669", name="WIFI-7669") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7669", name="WIFI-7669") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7669", name="WIFI-7669") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7669", name="WIFI-7669") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_IN_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'IN', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(IN)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE IN") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_IN_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_20Mhz.py deleted file mode 100644 index d538bab9d..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_20Mhz.py +++ /dev/null @@ -1,1700 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7305", name="WIFI-7305") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7307", name="WIFI-7307") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_40Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_40Mhz.py deleted file mode 100644 index c80cf6976..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_40Mhz.py +++ /dev/null @@ -1,1151 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7308", name="WIFI-7308") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7306", name="WIFI-7306") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_80Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_80Mhz.py deleted file mode 100644 index a496e7b7d..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/android/test_JP_80Mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7309", name="WIFI-7309") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7309", name="WIFI-7309") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7309", name="WIFI-7309") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7309", name="WIFI-7309") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7639", name="WIFI-7639") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20mhz.py deleted file mode 100644 index 54bc52459..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20mhz.py +++ /dev/null @@ -1,1729 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.iOS, pytest.mark.interop_iOS, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40mhz.py deleted file mode 100644 index f3e5be635..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40mhz.py +++ /dev/null @@ -1,1162 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.iOS, pytest.mark.interop_iOS, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80mhz.py deleted file mode 100644 index 2ef57ff3f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80mhz.py +++ /dev/null @@ -1,1025 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.iOS, pytest.mark.interop_iOS, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_JP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'JP', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_JP_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_20mhz.py deleted file mode 100644 index 3ce97c2ba..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_20mhz.py +++ /dev/null @@ -1,1712 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_40mhz.py deleted file mode 100644 index 5f6002f48..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_40mhz.py +++ /dev/null @@ -1,1151 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_80mhz.py deleted file mode 100644 index 41862d568..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/android/test_RU_80mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_20mhz.py deleted file mode 100644 index 70496005a..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_20mhz.py +++ /dev/null @@ -1,1729 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7598", name="WIFI-7598") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_40mhz.py deleted file mode 100644 index 40cd09213..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_40mhz.py +++ /dev/null @@ -1,1165 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7595", name="WIFI-7595") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7594", name="WIFI-7594") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_80mhz.py deleted file mode 100644 index d20340492..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_RU/iOS/test_RU_80mhz.py +++ /dev/null @@ -1,1028 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_RU, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7602", name="WIFI-7602") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7602", name="WIFI-7602") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7602", name="WIFI-7602") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7602", name="WIFI-7602") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_RU_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'RU', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7596", name="WIFI-7596") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_20mhz.py deleted file mode 100644 index 9bc9d3410..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_20mhz.py +++ /dev/null @@ -1,1709 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_SG, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7730", name="WIFI-7730") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7739", name="WIFI-7739") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_40mhz.py deleted file mode 100644 index 160141f90..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_40mhz.py +++ /dev/null @@ -1,1151 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_SG, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7741", name="WIFI-7741") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7732", name="WIFI-7732") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_80mhz.py deleted file mode 100644 index 541cc99c5..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/android/test_SG_80mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_SG, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7742", name="WIFI-7742") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7742", name="WIFI-7742") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7742", name="WIFI-7742") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7742", name="WIFI-7742") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7734", name="WIFI-7734") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_20mhz.py deleted file mode 100644 index 959231d17..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_20mhz.py +++ /dev/null @@ -1,1729 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_SG, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7767", name="WIFI-7767") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7738", name="WIFI-7738") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_40mhz.py deleted file mode 100644 index fcc55f633..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_40mhz.py +++ /dev/null @@ -1,1165 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_SG, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7740", name="WIFI-7740") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7736", name="WIFI-7736") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_80mhz.py deleted file mode 100644 index 1875a62fa..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_SG/iOS/test_SG_80mhz.py +++ /dev/null @@ -1,1028 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_SG,pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7743", name="WIFI-7743") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7743", name="WIFI-7743") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7743", name="WIFI-7743") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7743", name="WIFI-7743") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(RU)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE RU") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7737", name="WIFI-7737") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_20mhz.py deleted file mode 100644 index 008e7914f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_20mhz.py +++ /dev/null @@ -1,1704 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_us, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7290", name="WIFI-7290") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7290", name="WIFI-7290") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7634", name="WIFI-7634") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.US - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_40mhz.py deleted file mode 100644 index c87c32757..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_40mhz.py +++ /dev/null @@ -1,1152 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_us, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7293", name="WIFI-7293") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7635", name="WIFI-7635") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_80mhz.py deleted file mode 100644 index 5c57732d5..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/android/test_US_80mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_us, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7294", name="WIFI-7294") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7294", name="WIFI-7294") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7294", name="WIFI-7294") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7294", name="WIFI-7294") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7636", name="WIFI-7636") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py deleted file mode 100644 index 31f9bf09f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py +++ /dev/null @@ -1,1730 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py deleted file mode 100644 index 18f71fa0f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py +++ /dev/null @@ -1,1167 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven - """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py deleted file mode 100644 index ba8ebbc0b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py +++ /dev/null @@ -1,1029 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, - pytest.mark.bridge] - - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn132_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} - ]}, - "rf": {"5G": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa.py deleted file mode 100644 index a99896e63..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa.py +++ /dev/null @@ -1,1809 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and - ,pytest.mark.multi_psk, pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "psk", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "psk", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("BRIDGE MODE Multi PSK") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.two_vlan - def test_multi_psk_wpa_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - @pytest.mark.two_vlan - def test_multi_psk_wpa_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #-------------4 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.four_vlan - def test_multi_psk_wpa_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - @pytest.mark.four_vlan - def test_multi_psk_wpa_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.eight_vlan - def test_multi_psk_wpa_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - @pytest.mark.eight_vlan - def test_multi_psk_wpa_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - @pytest.mark.sixteen_vlan - def test_multi_psk_wpa_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - @pytest.mark.sixteen_vlan - def test_multi_psk_wpa_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa2.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa2.py deleted file mode 100644 index e479ba94b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa2.py +++ /dev/null @@ -1,1809 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and - ,pytest.mark.multi_psk, pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "psk2", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "psk2", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.two_vlan - def test_multi_psk_wpa2_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.two_vlan - def test_multi_psk_wpa2_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #-------------4 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.four_vlan - def test_multi_psk_wpa2_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.four_vlan - def test_multi_psk_wpa2_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.eight_vlan - def test_multi_psk_wpa2_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.eight_vlan - def test_multi_psk_wpa2_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.sixteen_vlan - def test_multi_psk_wpa2_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.sixteen_vlan - def test_multi_psk_wpa2_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa3.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa3.py deleted file mode 100644 index dd780e3d2..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/android/test_multipsk_wpa3.py +++ /dev/null @@ -1,1801 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and - ,pytest.mark.multi_psk, pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "sae", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "sae", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("BRIDGE MODE Multi PSK") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #-------------4 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_and(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_and(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_and(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_and(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_and(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_and(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_and(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_and(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_and(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_and(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_and(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_and(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_and(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_and(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_and(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_and(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa.py deleted file mode 100644 index eaf0b4cac..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa.py +++ /dev/null @@ -1,1804 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown, \ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.multi_psk, pytest.mark.bridge] -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "psk", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "psk", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - - -@allure.feature("BRIDGE MODE Multi Psk") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - @pytest.mark.wpa - @pytest.mark.twog - def test_multi_psk_wpa_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_multi_psk_wpa_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------4 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - def test_multi_psk_wpa_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_multi_psk_wpa_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - def test_multi_psk_wpa_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_multi_psk_wpa_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa - @pytest.mark.twog - def test_multi_psk_wpa_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_iOS, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_iOS, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_iOS, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_iOS, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_iOS, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_iOS, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_iOS, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_iOS, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_multi_psk_wpa_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa2.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa2.py deleted file mode 100644 index b090ccad0..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa2.py +++ /dev/null @@ -1,1804 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.multi_psk, pytest.mark.bridge] -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "psk2", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "psk2", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("BRIDGE MODE Multi Psk") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_multi_psk_wpa2_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1."+ str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_multi_psk_wpa2_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #-------------4 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_multi_psk_wpa2_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_multi_psk_wpa2_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_multi_psk_wpa2_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_multi_psk_wpa2_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa2_personal - @pytest.mark.twog - def test_multi_psk_wpa2_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_iOS, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_iOS, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_iOS, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_iOS, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_iOS, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_iOS, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_iOS, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_iOS, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - def test_multi_psk_wpa2_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa3.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa3.py deleted file mode 100644 index 284ff9c89..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/multi_psk/iOS/test_multipsk_wpa3.py +++ /dev/null @@ -1,1804 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown, \ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.multi_psk, pytest.mark.bridge] -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_2g_mpsk", - "appliedRadios": ["2G"], - "security": "sae", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - }, - {"ssid_name": "ssid_5g_mpsk", - "appliedRadios": ["5G"], - "security": "sae", - "security_key": "something", - "multi-psk": [ - { - "key": "lanforge1", - "vlan-id": 100 - }, - { - "key": "lanforge2", - "vlan-id": 150 - }, - { - "key": "lanforge3", - "vlan-id": 200 - }, - { - "key": "lanforge4", - "vlan-id": 250 - }, - { - "key": "lanforge5", - "vlan-id": 300 - }, - { - "key": "lanforge6", - "vlan-id": 350 - }, - { - "key": "lanforge7", - "vlan-id": 400 - }, - { - "key": "lanforge8", - "vlan-id": 450 - }, - { - "key": "lanforge9", - "vlan-id": 500 - }, - { - "key": "lanforge10", - "vlan-id": 550 - }, - { - "key": "lanforge11", - "vlan-id": 600 - }, - { - "key": "lanforge12", - "vlan-id": 650 - }, - { - "key": "lanforge13", - "vlan-id": 700 - }, - { - "key": "lanforge14", - "vlan-id": 750 - }, - { - "key": "lanforge15", - "vlan-id": 800 - }, - { - "key": "lanforge16", - "vlan-id": 850 - } - ], - } - ]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - - -@allure.feature("BRIDGE MODE Multi Psk") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestMultipskBridge(object): - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_2vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - print(vlan1) - print(vlan2) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------4 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_4vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------8 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_8vlans(self, request, get_vif_state, get_ap_logs, lf_tools, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - # -------------16 Vlans---------------------------------- - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_multi_psk_wpa3_2g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_iOS, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_iOS, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_iOS, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_iOS, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_iOS, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_iOS, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_iOS, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_iOS, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_iOS, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_iOS, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_iOS, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_iOS, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_iOS, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_iOS, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_iOS, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_iOS, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_multi_psk_wpa3_5g_16vlans(self, request, get_vif_state, get_ap_logs, lf_tools, get_configuration, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - key1 = profile_data["multi-psk"][0]["key"] - key2 = profile_data["multi-psk"][1]["key"] - key3 = profile_data["multi-psk"][2]["key"] - key4 = profile_data["multi-psk"][3]["key"] - key5 = profile_data["multi-psk"][4]["key"] - key6 = profile_data["multi-psk"][5]["key"] - key7 = profile_data["multi-psk"][6]["key"] - key8 = profile_data["multi-psk"][7]["key"] - key9 = profile_data["multi-psk"][8]["key"] - key10 = profile_data["multi-psk"][9]["key"] - key11 = profile_data["multi-psk"][10]["key"] - key12 = profile_data["multi-psk"][11]["key"] - key13 = profile_data["multi-psk"][12]["key"] - key14 = profile_data["multi-psk"][13]["key"] - key15 = profile_data["multi-psk"][14]["key"] - key16 = profile_data["multi-psk"][15]["key"] - vlan1 = profile_data["multi-psk"][0]["vlan-id"] - vlan2 = profile_data["multi-psk"][1]["vlan-id"] - vlan3 = profile_data["multi-psk"][2]["vlan-id"] - vlan4 = profile_data["multi-psk"][3]["vlan-id"] - vlan5 = profile_data["multi-psk"][4]["vlan-id"] - vlan6 = profile_data["multi-psk"][5]["vlan-id"] - vlan7 = profile_data["multi-psk"][6]["vlan-id"] - vlan8 = profile_data["multi-psk"][7]["vlan-id"] - vlan9 = profile_data["multi-psk"][8]["vlan-id"] - vlan10 = profile_data["multi-psk"][9]["vlan-id"] - vlan11 = profile_data["multi-psk"][10]["vlan-id"] - vlan12 = profile_data["multi-psk"][11]["vlan-id"] - vlan13 = profile_data["multi-psk"][12]["vlan-id"] - vlan14 = profile_data["multi-psk"][13]["vlan-id"] - vlan15 = profile_data["multi-psk"][14]["vlan-id"] - vlan16 = profile_data["multi-psk"][15]["vlan-id"] - print(vlan1) - print(vlan2) - print(vlan3) - print(vlan4) - print(vlan5) - print(vlan6) - print(vlan7) - print(vlan8) - print(vlan9) - print(vlan10) - print(vlan11) - print(vlan12) - print(vlan13) - print(vlan14) - print(vlan15) - print(vlan16) - vlan_ip1 = lf_tools.json_get("/port/1/1/eth1." + str(vlan1))["interface"]["ip"] - vlan_ip2 = lf_tools.json_get("/port/1/1/eth1." + str(vlan2))["interface"]["ip"] - vlan_ip3 = lf_tools.json_get("/port/1/1/eth1." + str(vlan3))["interface"]["ip"] - vlan_ip4 = lf_tools.json_get("/port/1/1/eth1." + str(vlan4))["interface"]["ip"] - vlan_ip5 = lf_tools.json_get("/port/1/1/eth1." + str(vlan5))["interface"]["ip"] - vlan_ip6 = lf_tools.json_get("/port/1/1/eth1." + str(vlan6))["interface"]["ip"] - vlan_ip7 = lf_tools.json_get("/port/1/1/eth1." + str(vlan7))["interface"]["ip"] - vlan_ip8 = lf_tools.json_get("/port/1/1/eth1." + str(vlan8))["interface"]["ip"] - vlan_ip9 = lf_tools.json_get("/port/1/1/eth1." + str(vlan9))["interface"]["ip"] - vlan_ip10 = lf_tools.json_get("/port/1/1/eth1." + str(vlan10))["interface"]["ip"] - vlan_ip11 = lf_tools.json_get("/port/1/1/eth1." + str(vlan11))["interface"]["ip"] - vlan_ip12 = lf_tools.json_get("/port/1/1/eth1." + str(vlan12))["interface"]["ip"] - vlan_ip13 = lf_tools.json_get("/port/1/1/eth1." + str(vlan13))["interface"]["ip"] - vlan_ip14 = lf_tools.json_get("/port/1/1/eth1." + str(vlan14))["interface"]["ip"] - vlan_ip15 = lf_tools.json_get("/port/1/1/eth1." + str(vlan15))["interface"]["ip"] - vlan_ip16 = lf_tools.json_get("/port/1/1/eth1." + str(vlan16))["interface"]["ip"] - print(vlan_ip1) - print(vlan_ip2) - print(vlan_ip3) - print(vlan_ip4) - print(vlan_ip5) - print(vlan_ip6) - print(vlan_ip7) - print(vlan_ip8) - print(vlan_ip9) - print(vlan_ip10) - print(vlan_ip11) - print(vlan_ip12) - print(vlan_ip13) - print(vlan_ip14) - print(vlan_ip15) - print(vlan_ip16) - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip1, is_internet1 = get_ip_address_ios(request, ssidName, key1, setup_perfectoMobile_android, connData) - # - if ip1: - if is_internet1: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip1 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip1 = ip1.split(".") - vlan_ip1 = vlan_ip1.split(".") - print(ip1[:2], vlan_ip1[:2]) - for i, j in zip(ip1[:2], vlan_ip1[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip2, is_internet2 = get_ip_address_ios(request, ssidName, key2, setup_perfectoMobile_android, connData) - # - if ip2: - if is_internet2: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip2 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip2 = ip2.split(".") - vlan_ip2 = vlan_ip2.split(".") - print(ip2[:2], vlan_ip2[:2]) - for i, j in zip(ip2[:2], vlan_ip2[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip3, is_internet3 = get_ip_address_ios(request, ssidName, key3, setup_perfectoMobile_android, connData) - # - if ip3: - if is_internet3: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip3 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip3 = ip3.split(".") - vlan_ip3 = vlan_ip3.split(".") - print(ip3[:2], vlan_ip3[:2]) - for i, j in zip(ip3[:2], vlan_ip3[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip4, is_internet4 = get_ip_address_ios(request, ssidName, key4, setup_perfectoMobile_android, connData) - # - if ip4: - if is_internet4: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip4 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip4 = ip4.split(".") - vlan_ip4 = vlan_ip4.split(".") - print(ip4[:2], vlan_ip4[:2]) - for i, j in zip(ip4[:2], vlan_ip4[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip5, is_internet5 = get_ip_address_ios(request, ssidName, key5, setup_perfectoMobile_android, connData) - # - if ip5: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip5 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip5 = ip5.split(".") - vlan_ip5 = vlan_ip5.split(".") - print(ip5[:2], vlan_ip5[:2]) - for i, j in zip(ip5[:2], vlan_ip5[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip6, is_internet6 = get_ip_address_ios(request, ssidName, key6, setup_perfectoMobile_android, connData) - # - if ip6: - if is_internet6: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip6 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip6 = ip6.split(".") - vlan_ip6 = vlan_ip6.split(".") - print(ip6[:2], vlan_ip6[:2]) - for i, j in zip(ip6[:2], vlan_ip6[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip7, is_internet7 = get_ip_address_ios(request, ssidName, key7, setup_perfectoMobile_android, connData) - # - if ip7: - if is_internet7: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip7 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip7 = ip7.split(".") - vlan_ip7 = vlan_ip7.split(".") - print(ip7[:2], vlan_ip7[:2]) - for i, j in zip(ip7[:2], vlan_ip7[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip8, is_internet8 = get_ip_address_ios(request, ssidName, key8, setup_perfectoMobile_android, connData) - # - if ip8: - if is_internet8: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip8 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip8 = ip8.split(".") - vlan_ip8 = vlan_ip8.split(".") - print(ip8[:2], vlan_ip8[:2]) - for i, j in zip(ip8[:2], vlan_ip8[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip9, is_internet9 = get_ip_address_ios(request, ssidName, key9, setup_perfectoMobile_android, connData) - # - if ip9: - if is_internet9: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip9 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip9 = ip9.split(".") - vlan_ip = vlan_ip9.split(".") - print(ip9[:2], vlan_ip9[:2]) - for i, j in zip(ip9[:2], vlan_ip9[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip10, is_internet10 = get_ip_address_ios(request, ssidName, key10, setup_perfectoMobile_android, connData) - # - if ip10: - if is_internet10: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip10 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip10 = ip10.split(".") - vlan_ip10 = vlan_ip10.split(".") - print(ip10[:2], vlan_ip10[:2]) - for i, j in zip(ip10[:2], vlan_ip10[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip11, is_internet11 = get_ip_address_ios(request, ssidName, key11, setup_perfectoMobile_android, connData) - # - if ip11: - if is_internet11: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip11 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip11 = ip11.split(".") - vlan_ip11 = vlan_ip11.split(".") - print(ip11[:2], vlan_ip11[:2]) - for i, j in zip(ip11[:2], vlan_ip11[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip12, is_internet12 = get_ip_address_ios(request, ssidName, key12, setup_perfectoMobile_android, connData) - # - if ip12: - if is_internet12: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip12 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip12 = ip12.split(".") - vlan_ip12 = vlan_ip12.split(".") - print(ip12[:2], vlan_ip12[:2]) - for i, j in zip(ip12[:2], vlan_ip12[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip13, is_internet13 = get_ip_address_ios(request, ssidName, key13, setup_perfectoMobile_android, connData) - # - if ip13: - if is_internet5: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip13 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip13 = ip13.split(".") - vlan_ip13 = vlan_ip13.split(".") - print(ip13[:2], vlan_ip13[:2]) - for i, j in zip(ip13[:2], vlan_ip13[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip14, is_internet14 = get_ip_address_ios(request, ssidName, key14, setup_perfectoMobile_android, connData) - # - if ip14: - if is_internet14: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip14 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip14 = ip14.split(".") - vlan_ip14 = vlan_ip14.split(".") - print(ip14[:2], vlan_ip14[:2]) - for i, j in zip(ip14[:2], vlan_ip14[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip15, is_internet15 = get_ip_address_ios(request, ssidName, key15, setup_perfectoMobile_android, connData) - # - if ip15: - if is_internet15: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip15 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip15 = ip15.split(".") - vlan_ip15 = vlan_ip15.split(".") - print(ip15[:2], vlan_ip15[:2]) - for i, j in zip(ip15[:2], vlan_ip15[:2]): - if i != j: - assert False - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - time.sleep(5) - ip16, is_internet16 = get_ip_address_ios(request, ssidName, key16, setup_perfectoMobile_android, connData) - # - if ip16: - if is_internet16: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip16 + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - ip16 = ip16.split(".") - vlan_ip16 = vlan_ip16.split(".") - print(ip16[:2], vlan_ip16[:2]) - for i, j in zip(ip16[:2], vlan_ip16[:2]): - if i != j: - assert False - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/test_rate_limiting.py deleted file mode 100644 index ad0be89dc..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/android/test_rate_limiting.py +++ /dev/null @@ -1,298 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, - pytest.mark.rate_limiting, pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, return_upload_download_speed_android, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_android - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("Bridge MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingBridge(object): - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/test_rate_limiting.py deleted file mode 100644 index 730de3ed2..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/iOS/test_rate_limiting.py +++ /dev/null @@ -1,300 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - return_upload_download_speed_iOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_iOS - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.rate_limiting, pytest.mark.bridge] -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("Bridge MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingBridge(object): - - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py new file mode 100644 index 000000000..9226a44a0 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/rate_limiting/test_rate_limiting.py @@ -0,0 +1,247 @@ +""" + Rate Limiting : BRIDGE Mode + pytest -m "rate_limiting_tests and bridge and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.bridge, pytest.mark.general] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa2_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa": [ + {"ssid_name": "ssid_wpa_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa3_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string +@allure.feature("BRIDGE MODE RATE LIMITING") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Rate Limiting") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingBridge(object): + """ + Bridge Rate Limiting (wpa. wpa2. wpa3) (twog, fiveg) + pytest -m "rate_limiting_tests and bridge and general" + """ + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7008", name="JIRA LINK") + def test_rate_limiting_wpa_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7009",name="JIRA LINK") + def test_rate_limiting_wpa_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa encryption 5 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7008", name="JIRA LINK") + def test_rate_limiting_wpa2_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7009", name="JIRA LINK") + def test_rate_limiting_wpa2_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7008", name="JIRA LINK") + def test_rate_limiting_wpa3_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa3_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7009", name="JIRA LINK") + def test_rate_limiting_wpa3_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + BRIDGE Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and bridge and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py deleted file mode 100644 index e77105530..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py +++ /dev/null @@ -1,209 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleAirplaneModeAndroidBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleAirplaneMode_5g_Open_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ToogleAirplaneMode_2g_Open_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index cf7904e3a..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidBridgeModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6414", name="WIFI-6414") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_5g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6415", name="WIFI-6415") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_2g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6416", name="WIFI-6416") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_5g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6417", name="WIFI-6417") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_2g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6412", name="WIFI-6412") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_5g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6413", name="WIFI-6413") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_2g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py deleted file mode 100644 index a4516acf8..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,630 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidBridgeModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6400", name="WIFI-6400") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6401", name="WIFI-6401") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6402", name="WIFI-6402") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6403", name="WIFI-6403") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6404", name="WIFI-6404") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleAirplaneMode_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6405", name="WIFI-6405") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleAirplaneMode_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidBridgeModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6406", name="WIFI-6406") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6407", name="WIFI-6407") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6408", name="WIFI-6408") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6409", name="WIFI-6409") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6410", name="WIFI-6410") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6411", name="WIFI-6411") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py deleted file mode 100644 index 46010ea74..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py +++ /dev/null @@ -1,239 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \ - verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleAirplaneMode] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleAirplaneModeBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ResultFlag: " + resultFlag) - # print(resultFlag) - # reportResultFlag.reportFlag = resultFlag - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - @pytest.mark.open - @pytest.mark.fiveg - def test_ToogleAirplaneMode_5g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_ToogleAirplaneMode_2g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index fef70e28d..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,342 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleAirplaneMode] - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop Regression") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeBridgeModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and bridge and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6545", name="WIFI-6545") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6546", name="WIFI-6546") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleAirplaneMode_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6547", name="WIFI-6547") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6548", name="WIFI-6548") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleAirplaneMode_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6543", name="WIFI-6543") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6544", name="WIFI-6544") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleAirplaneMode_2g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py deleted file mode 100644 index 164192c5b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py +++ /dev/null @@ -1,624 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleAirplaneMode] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteOneBridge(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6531", name="WIFI-6531") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6532", name="WIFI-6532") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6533", name="WIFI-6533") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleAirplaneMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6534", name="WIFI-6534") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleAirplaneMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6537", name="WIFI-6537") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleAirplaneMode_5g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6538", name="WIFI-6538") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleAirplaneMode_2g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteBridgeTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6535", name="WIFI-6535") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_5g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6536", name="WIFI-6536") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_2g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6539", name="WIFI-6539") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6540", name="WIFI-6540") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6541", name="WIFI-6541") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6542", name="WIFI-6542") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..d5294b8c9 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_enterprise_ttls.py @@ -0,0 +1,310 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging + +import allure +import pytest + +import random +import string +import time + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("BRIDGE MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeToggleAirplaneEnterpriseTTLSSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.story('wpa enterprise 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.story('wpa enterprise 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.story('wpa2 enterprise 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa2 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa2_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.story('wpa2 enterprise 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa2 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa2_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.story('wpa3 enterprise 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.story('wpa3 enterprise 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + +setup_params_enterprise_two_br = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] + }, + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise_two_br['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_br['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise_two_br['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise_two_br['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("BRIDGE MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_br], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeEnterpriseTTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + """ + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_enterprise_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_bridge_wpa_wpa2_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_enterprise_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_wpa2_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_enterprise_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_enterprise_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_br["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..19afc87c7 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/test_general_security_modes.py @@ -0,0 +1,328 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" + +import logging + +import allure +import pytest + +import random +import string +import time + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.bridge, pytest.mark.general] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "open": [{"ssid_name": "open_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "open_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa": [{"ssid_name": "wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + + +@allure.feature("BRIDGE MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeToggleAirplaneSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.open + @pytest.mark.twog + @allure.story('open 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_open_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @allure.story('open 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_open_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa2_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa2_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + print(setup_params_general) + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + +setup_params_general_two_br = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_br", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_br", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two_br['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_br['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general_two_br['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general_two_br['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + + +@allure.feature("BRIDGE MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_br], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestBridgeModeToggleAirplaneSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteB" + """ + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_personal_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_wpa2_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa_wpa2_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("BRIDGE Mode Toggle Airplane Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_bridge_wpa3_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_br["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py deleted file mode 100644 index bc83f39a9..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py +++ /dev/null @@ -1,216 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, - pytest.mark.ToggleWifiMode] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, \ - ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleWifiModeBridge(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.fiveg - def test_ToogleWifiMode_5g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_ToogleWifiMode_2g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index 15f08f79f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidBridgeModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6487", name="WIFI-6487") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_5g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6488", name="WIFI-6488") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_2g_WPA2_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6489", name="WIFI-6489") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_5g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6490", name="WIFI-6490") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_2g_WPA3_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6471", name="WIFI-6471") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_5g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6486", name="WIFI-6486") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_2g_WPA_enterprise_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, identity, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py deleted file mode 100644 index 4a9d5ea27..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,630 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidBridgeModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6459", name="WIFI-6459") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6460", name="WIFI-6460") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6461", name="WIFI-6461") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6462", name="WIFI-6462") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_Personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6463", name="WIFI-6463") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleWifiMode_5g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6464", name="WIFI-6464") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleWifiMode_2g_Open_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidBridgeModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6465", name="WIFI-6465") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_5g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6466", name="WIFI-6466") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_2g_wpa3_personal_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6467", name="WIFI-6467") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_5g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6468", name="WIFI-6468") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_2g_wpa3_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6469", name="WIFI-6469") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_5g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6470", name="WIFI-6470") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py deleted file mode 100644 index bbb421579..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py +++ /dev/null @@ -1,238 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleWifiMode] - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \ - verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleWifiModeBridgeMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode. - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode. - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi. - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleWifiMode_5g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ToogleWifiMode_2g_OPEN_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index f97886b4e..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,343 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleWifiMode] - -setup_params_enterprise = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeBridgeModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and bridge and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6603", name="WIFI-6603") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6604", name="WIFI-6604") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleWifiMode_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6605", name="WIFI-6605") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6606", name="WIFI-6606") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleWifiMode_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6601", name="WIFI-6601") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6602", name="WIFI-6602") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleWifiMode_2g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py deleted file mode 100644 index cb20df9d4..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,624 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleWifiMode] - -setup_params_general = { - "mode": "BRIDGE", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("BRIDGE MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeSuiteOneBridge(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6589", name="WIFI-6589") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6590", name="WIFI-6590") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6593", name="WIFI-6593") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleWifiMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6594", name="WIFI-6594") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleWifiMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6595", name="WIFI-6595") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleWifiMode_5g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6596", name="WIFI-6596") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleWifiMode_2g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "BRIDGE", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("BRIDGE MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteBridgeTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6591", name="WIFI-6591") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_5g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6592", name="WIFI-6592") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_2g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6597", name="WIFI-6597") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_5g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6598", name="WIFI-6598") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_2g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6599", name="WIFI-6599") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_5g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6600", name="WIFI-6600") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_2g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..e4e8dfe7c --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_enterprise_ttls.py @@ -0,0 +1,145 @@ +""" + Toggle Wifi Mode : BRIDGE Mode + pytest -m "toggle_wifi_mode and bridge and enterprise" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.bridge, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("BRIDGE MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeBridgeSuiteOne(object): + """ + Bridge Toggle Wifi-Mode (wpa_enterprise. wpa2_enterprise. wpa3_enterprise) (twog, fiveg) + pytest -m "toggle_wifi_mode and bridge and SuiteOne" + """ + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6487", name="WIFI-6487") + def test_ToggleWifiMode_WPA2_enterprise_5g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6488", name="WIFI-6488") + def test_ToggleWifiMode_WPA2_enterprise_2g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6471", name="WIFI-6471") + def test_ToggleWifiMode_WPA_enterprise_5g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6486", name="WIFI-6486") + def test_ToggleWifiMode_WPA_enterprise_2g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6489", name="WIFI-6489") + def test_ToggleWifiMode_WPA3_enterprise_5g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + @allure.title("BRIDGE Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6490", name="WIFI-6490") + def test_ToggleWifiMode_WPA3_enterprise_2g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..a115bfe1f --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/test_general_security_modes.py @@ -0,0 +1,254 @@ +""" + Toggle Wifi Mode : BRIDGE Mode + pytest -m "toggle_wifi_mode and bridge and general" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.bridge, pytest.mark.general] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("BRIDGE MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeBridgeSuiteOne(object): + """ + Bridge Toggle Wifi-Mode (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "toggle_wifi_mode and bridge and SuiteOne" + """ + @pytest.mark.twog + @pytest.mark.wpa2_personal + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6460", name="WIFI-6460") + def test_ToggleWifiMode_WPA2_Personal_2g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6459", name="WIFI-6459") + def test_ToggleWifiMode_WPA2_Personal_5g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6462", name="WIFI-6462") + def test_ToggleWifiMode_WPA_2g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6461", name="WIFI-6461") + def test_ToggleWifiMode_WPA_5g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.open + @allure.title("BRIDGE Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6464", name="WIFI-6464") + def test_ToggleWifiMode_open_2g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.open + @allure.title("BRIDGE Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6463", name="WIFI-6463") + def test_ToggleWifiMode_open_5g_Bridge(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + +setup_params_general_two = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],"security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],"security_key": "something"}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],"security_key": "something"}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two['ssid_modes'].keys(): + for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): + N = 2 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string + +@pytest.mark.InteropsuiteB +@allure.feature("BRIDGE MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeBridgeSuiteTwo(object): + """ + Bridge Toggle Wifi-Mode (wpa3_personal. wpa3_personal_mixed. wpa_wpa2_personal_mixed) (twog, fiveg) + pytest -m "toggle_wifi_mode and bridge and SuiteTwo" + """ + @pytest.mark.twog + @pytest.mark.wpa3_personal + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6466", name="WIFI-6466") + def test_ToggleWifiMode_WPA3_Personal_2g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6465", name="WIFI-6465") + def test_ToggleWifiMode_WPA3_Personal_5g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_personal_mixed + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6468", name="WIFI-6468") + def test_ToggleWifiMode_WPA3_Personal_Mixed_2g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal_mixed + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6467", name="WIFI-6467") + def test_ToggleWifiMode_WPA3_Personal_Mixed_5g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6470", name="WIFI-6470") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_2g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("BRIDGE Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6469", name="WIFI-6469") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_5g_Bridge(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result",body=str(result)) + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/test_AccessPointConnection.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/test_AccessPointConnection.py deleted file mode 100644 index 9401b1347..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/android/test_AccessPointConnection.py +++ /dev/null @@ -1,217 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, pytest.mark.AccessPointConnection] - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from android_lib import closeApp, verifyUploadDownloadSpeed_android, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestAcessPointConnection(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_AccessPointConnection_5g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_AccessPointConnection_2g_WPA2_Personal(self,request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_AccessPointConnection_5g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_AccessPointConnection_2g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_AccessPointConnection_2g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_AccessPointConnection_5g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/test_AccessPointConnection.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/test_AccessPointConnection.py deleted file mode 100644 index 9d5a2acc6..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/access_point_connection_test/iOS/test_AccessPointConnection.py +++ /dev/null @@ -1,239 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.AccessPointConnection] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestAccessPointConnectivetyNatMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_AccessPointConnection_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - #Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_AccessPointConnection_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - #Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_AccessPointConnection_5g_WPA_NAT(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - #Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_AccessPointConnection_2g_WPA_NAT(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - #Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_AccessPointConnection_5g_OPEN_NAT(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_AccessPointConnection_2g_OPEN_NAT(self, request, get_vif_state, get_AccessPointConn_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_AccessPointConn_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Need An ip To ping - wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) - - # Open Ping Application - openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) - - ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py deleted file mode 100644 index 22daca77f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,495 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, - pytest.mark.client_connect, pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, \ - openApp, get_ip_address_eap_and - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - -# class TestUniqueSSIDEnterpriseNatAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_nat_and -# def test_unique_ssid_enterprise_nat_and(self): -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4823", name="WIFI-4823") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnect_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4822", name="WIFI-4822") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4825", name="WIFI-4825") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnect_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4824", name="WIFI-4824") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4827", name="WIFI-4827") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnect_5g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4826", name="WIFI-4826") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_enterprise_two = { - "mode": "NAT", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDNatEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_nat_and -# def test_unique_ssid_nat_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-B") -@pytest.mark.suiteB -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7418", name="WIFI-7418") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7417", name="WIFI-7417") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Nat(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7420", name="WIFI-7420") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_enterprise_mixed_Nat(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7419", name="WIFI-7419") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_enterprise_mixed_Nat(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_general_security_modes.py deleted file mode 100644 index 1e23d7cbe..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/android/test_general_security_modes.py +++ /dev/null @@ -1,554 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.nat] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralOneNatIos(object): -# -# @pytest.mark.unique_ssid_general_one_nat_ios -# def test_unique_ssid_general_one_nat_ios(self): -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectSuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4510", name="WIFI-4510") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4509", name="WIFI-4509") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4507", name="WIFI-4507") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4505", name="WIFI-4505") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4504", name="WIFI-4504") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4503", name="WIFI-4503") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralTwoNatAND(object): -# -# @pytest.mark.unique_ssid_general_two_nat_and -# def test_unique_ssid_general_two_nat_and(self): -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="NAT Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and nat and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4516", name="WIFI-4516") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4515", name="WIFI-4515") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4521", name="WIFI-4521") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4519", name="WIFI-4519") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4524", name="WIFI-4524") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4523", name="WIFI-4523") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 3e8d19084..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,494 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -# class TestUniqueSSIDEnterpriseNatIOS(object): -# -# @pytest.mark.unique_ssid_enterprise_nat_ios -# def test_unique_ssid_enterprise_nat_ios(self): -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and nat and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4697", name="WIFI-4697") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4696", name="WIFI-4696") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4701", name="WIFI-4701") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4700", name="WIFI-4700") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4699", name="WIFI-4699") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4698", name="WIFI-4698") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_enterprise_two = { - "mode": "NAT", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_mixed_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "wpa3_mixed_eap_5g", "appliedRadios": ["5G"]}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDNatEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_nat_and -# def test_unique_ssid_nat_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connect : Suite-B") -@pytest.mark.suiteB -@pytest.mark.mixed_eap -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7422", name="WIFI-7422") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_eap_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7421", name="WIFI-7421") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_eap_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7424", name="WIFI-7424") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_eap_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7423", name="WIFI-7423") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_eap_mixed_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py deleted file mode 100644 index 9d833540b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,593 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connect, pytest.mark.interop_uc_sanity, pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} -# class TestUniqueSSIDGeneralOneNATiOS(object): -# -# @pytest.mark.unique_ssid_general_one_nat_ios -# def test_unique_ssid_general_one_nat_ios(self): -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectSuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4501", name="WIFI-4502") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4485", name="WIFI-4485") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4484", name="WIFI-4484") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4483", name="WIFI-4483") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4482", name="WIFI-4482") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #Toggle AirplaneMode - # assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4481", name="WIFI-4481") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralTwoNAtiOS(object): -# -# @pytest.mark.unique_ssid_general_two_nat_ios -# def test_unique_ssid_general_two_nat_ios(self): -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - - # assert True - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectSuiteTwo(object): - """ Client Connect SuiteB - pytest -m "client_connect and nat and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4529", name="WIFI-4529") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4532", name="WIFI-4532") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4532", name="WIFI-4532") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4529", name="WIFI-4529") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4538", name="WIFI-4538") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4537", name="WIFI-4537") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert 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 TestAccessPointConnectivetyNat(object): -# -# @pytest.mark.fiveg -# @pytest.mark.open -# @pytest.mark.sushant -# def test_AccessPointConnection_5g_OPEN_Nat(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, -# setup_perfectoMobile_iOS): -# profile_data = setup_params_general["ssid_modes"]["open"][1] -# ssidName = profile_data["ssid_name"] -# ssidPassword = "[BLANK]" -# print("SSID_NAME: " + ssidName) -# # print ("SSID_PASS: " + ssidPassword) -# -# # if ssidName 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") -# -# report = setup_perfectoMobile_iOS[1] -# driver = setup_perfectoMobile_iOS[0] -# connData = get_APToMobileDevice_data -# -# # Set Wifi/AP Mode -# # set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) -# -# # Need An ip To ping -# # wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName) -# wifi_ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) -# print(wifi_ip) -# print(is_internet) -# assert wifi_ip -# # assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) -# -# # # Open Ping Application -# # openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS) -# # -# # ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip) -# -# # ForgetWifi -# # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_enterprise_ttls.py new file mode 100644 index 000000000..5f7d6df3c --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_enterprise_ttls.py @@ -0,0 +1,331 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and enterprise" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.nat, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "NAT", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + + +@allure.feature("NAT MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectSuiteA(object): + """ + NAT Client Connect (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connect_tests and nat and enterprise" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.title("NAT Mode Client Connect Test for wpa enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_nat_wpa_eap_2g_client_connect(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + """ + NAT Mode Client Connect Test with open encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and enterprise and open and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.title("NAT Mode Client Connect Test for wpa enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4566", name="JIRA LINK") + def test_nat_wpa_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with open encryption 5 GHz Band + pytest -m "client_connect_tests and nat and enterprise and open and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.title("NAT Mode Client Connect Test for wpa2 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4567", name="JIRA LINK") + def test_nat_wpa2_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and enterprise and wpa and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.title("NAT Mode Client Connect Test Test for wpa2 enterprise 5 GHzd") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4568", name="JIRA LINK") + def test_nat_wpa2_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.title("NAT Mode Client Connect Test for wpa3 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4569", name="JIRA LINK") + def test_nat_wpa3_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa2_personal and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.title("NAT Mode Client Connect Test for wpa3 enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4570", name="JIRA LINK") + def test_nat_wpa3_eap_5g_client_connect(self, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, setup_configuration, get_test_library, radius_info): + """ + BRIDGE Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa2_personal and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + assert passes == "PASS", result + + +setup_params_enterprise_two_nat = { + "mode": "NAT", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] + }, + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise_two_nat['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_nat['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("NAT MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_nat], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect_tests and nat and suiteB" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7410", name="JIRA LINK") + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band") + def test_nat_wpa_wpa2_eap_mixed_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + """ + NAT Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa3_personal and twog" + """ + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="JIRA LINK") + def test_nat_wpa_wpa2_eap_mixed_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + """ + NAT Mode Client Connect Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa3_personal and fiveg" + """ + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4573", name="JIRA LINK") + def test_nat_wpa3_eap_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa3_personal_mixed and twog" + """ + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4574", name="JIRA LINK") + def test_nat_wpa3_eap_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + NAT Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and nat and enterprise and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_general_security_modes.py new file mode 100644 index 000000000..c56e2ff65 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connect_test/test_general_security_modes.py @@ -0,0 +1,367 @@ +""" + + Client Connect : Nat Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.nat, pytest.mark.general] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa": [{"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("NAT MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectSuiteA(object): + """ + Nat Client Connect (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connect_tests and nat and general" + """ + + @pytest.mark.open + @pytest.mark.twog + @allure.story('OPEN 2.4 GHZ Band') + @allure.title("Nat Mode Client Connect Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4503", name="JIRA LINK") + def test_nat_open_2g_client_connect(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Client Connect Test with open encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and general and open and twog" + """ + profile_data = {"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @allure.story('OPEN 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4504", name="JIRA LINK") + def test_nat_open_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with open encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and open and fiveg" + """ + profile_data = {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4505", name="JIRA LINK") + def test_nat_wpa_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and nat and general and wpa and twog" + """ + profile_data = {"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4507", name="JIRA LINK") + def test_nat_wpa_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and wpa and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4509", name="JIRA LINK") + def test_nat_wpa2_personal_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and general and wpa2_personal and twog" + """ + profile_data = {"ssid_name": "ssid_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + # + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4510", name="JIRA LINK") + def test_bridge_wpa2_personal_5g_client_connect(self, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and wpa2_personal and fiveg" + """ + profile_data = {"ssid_name": "ssid_wpa2_5g_br", "appliedRadios": ["5G"], "security_key": "something"} + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + +setup_params_general_two_nat = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general_two_nat['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_nat['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("NAT MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_nat], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect_tests and nat and suiteB" + """ + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4515", name="JIRA LINK") + def test_nat_wpa3_personal_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and general and wpa3_personal and twog" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4516", name="JIRA LINK") + def test_nat_wpa3_personal_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4519", name="JIRA LINK") + def test_nat_wpa3_personal_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and general and wpa3_personal_mixed and twog" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4521", name="JIRA LINK") + def test_nat_wpa3_personal_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') + @allure.title("NAT Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4523", name="JIRA LINK") + def test_nat_wpa_wpa2_personal_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and nat and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "NAT" + band = "twog" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa wpa2 personal mixed 5 GHZ Band') + @allure.title("NAT Mode Client ConnectTest with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4524", name="JIRA LINK") + def test_nat_wpa_wpa2_personal_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration): + """ + NAT Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and nat and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.client_connect(ssid=ssid_name, passkey=security_key) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_NatMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_NatMode.py deleted file mode 100644 index 405a41461..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_NatMode.py +++ /dev/null @@ -1,235 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ClientConnectivity] - -from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android,\ - Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestNatMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Verify Upload download Speed from device Selection - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_5g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle AirplaneMode - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py deleted file mode 100644 index 374f59618..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,300 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_eap_and, verifyUploadDownloadSpeed_android, wifi_connect_eap, wifi_disconnect_and_forget - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4673", name="WIFI-4673") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4672", name="WIFI-4672") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4675", name="WIFI-4675") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4674", name="WIFI-4674") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4677", name="WIFI-4677") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_5g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4676", name="WIFI-4676") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_general_security_modes.py deleted file mode 100644 index de9f6a0fc..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/android/test_general_security_modes.py +++ /dev/null @@ -1,580 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.nat] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="NAT Mode Client Connectivity : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectivitySuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connectivity and nat and InteropsuiteA" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4536", name="WIFI-4536") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4535", name="WIFI-4535") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4534", name="WIFI-4534") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4533", name="WIFI-4533") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4531", name="WIFI-4531") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4530", name="WIFI-4530") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Bridge Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectivitySuiteTwo(object): - """ Client Connectivity SuiteB - pytest -m "client_connectivity and nat and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4539", name="WIFI-4539") - @pytest.mark.wpa3_personal - @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_2g_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4540", name="WIFI-4540") - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_5g_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4541", name="WIFI-4541") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.twog - @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_2g_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4542", name="WIFI-4542") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.fiveg - @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4543", name="WIFI-4543") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.twog - @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_2g_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4544", name="WIFI-4544") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.fiveg - @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_5g_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_NatMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_NatMode.py deleted file mode 100644 index 7f9844509..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_NatMode.py +++ /dev/null @@ -1,210 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ClientConnectivity] - -from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestNatMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - #Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - - @pytest.mark.fiveg - @pytest.mark.open - @pytest.mark.test_ClientConnectivity_5g_OPEN_ios - def test_ClientConnectivity_5g_OPEN(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Verify Upload download Speed from device Selection - verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 3f68faa74..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,311 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.nat, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and nat and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4717", name="WIFI-4717") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4716", name="WIFI-4716") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4721", name="WIFI-4721") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4720", name="WIFI-4720") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4719", name="WIFI-4719") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and nat and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4718", name="WIFI-4718") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_general_security_modes.py deleted file mode 100644 index 437036abe..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/client_connectivity_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,527 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connectivity, pytest.mark.interop_uc_sanity, pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Connectivity : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectivitySuiteNatOne(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4526", name="WIFI-4526") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4525", name="WIFI-4525") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4522", name="WIFI-4522") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4520", name="WIFI-4520") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4518", name="WIFI-4518") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4517", name="WIFI-4517") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestNatModeConnectivitySuiteNatTwo(object): - """ Client Connect SuiteA - pytest -m "client_connectivity and nat and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4528", name="WIFI-4528") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnectivity_5g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4527", name="WIFI-4527") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnectivity_2g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4532", name="WIFI-4532") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_5g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4529", name="WIFI-4529") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_2g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4538", name="WIFI-4538") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_5g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4537", name="WIFI-4537") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_2g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/test_rate_limiting.py deleted file mode 100644 index dc5b4de38..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/android/test_rate_limiting.py +++ /dev/null @@ -1,298 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, - pytest.mark.rate_limiting, pytest.mark.nat] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, return_upload_download_speed_android, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_android - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("NAT MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingNAT(object): - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/test_rate_limiting.py deleted file mode 100644 index 07d476e2b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/iOS/test_rate_limiting.py +++ /dev/null @@ -1,299 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - return_upload_download_speed_iOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_iOS - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.rate_limiting, pytest.mark.nat] -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("NAT MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingNAT(object): - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py new file mode 100644 index 000000000..608bef261 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/rate_limiting/test_rate_limiting.py @@ -0,0 +1,245 @@ +""" + Rate Limiting : NAT Mode + pytest -m "rate_limiting_tests and nat and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.nat, pytest.mark.general] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa2_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa": [ + {"ssid_name": "ssid_wpa_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa3_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string +@allure.feature("NAT MODE RATE LIMITING") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Rate Limiting") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingNat(object): + """ + NAT MODE Rate Limiting (wpa. wpa2. wpa3) (twog, fiveg) + pytest -m "rate_limiting_tests and nat and general" + """ + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7012", name="JIRA LINK") + def test_rate_limiting_wpa_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7013",name="JIRA LINK") + def test_rate_limiting_wpa_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa encryption 5 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7012", name="JIRA LINK") + def test_rate_limiting_wpa2_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7013", name="JIRA LINK") + def test_rate_limiting_wpa2_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7012", name="JIRA LINK") + def test_rate_limiting_wpa3_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa3_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("NAT Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7013", name="JIRA LINK") + def test_rate_limiting_wpa3_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + NAT Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and nat and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode.py deleted file mode 100644 index ca9f33a45..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode.py +++ /dev/null @@ -1,210 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleAirplaneModeAndroid(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleAirplaneMode_5g_Open(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ToogleAirplaneMode_2g_Open(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - #Toggle AirplaneMode - assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - - #ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index d2f40b609..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidNatModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6432", name="WIFI-6432") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6433", name="WIFI-6433") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6434", name="WIFI-6434") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6435", name="WIFI-6435") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6430", name="WIFI-6430") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_5g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6431", name="WIFI-6431") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_2g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_general_security_modes.py deleted file mode 100644 index 35760e5c8..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,630 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidNatModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6418", name="WIFI-6418") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6419", name="WIFI-6419") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6420", name="WIFI-6420") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6421", name="WIFI-6421") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6422", name="WIFI-6422") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleAirplaneMode_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6423", name="WIFI-6423") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleAirplaneMode_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidNatModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and nat and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6424", name="WIFI-6424") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_5g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6425", name="WIFI-6425") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_2g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6426", name="WIFI-6426") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_5g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6427", name="WIFI-6427") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_2g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6428", name="WIFI-6428") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_5g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6429", name="WIFI-6429") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_2g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode.py deleted file mode 100644 index 61f474f65..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode.py +++ /dev/null @@ -1,240 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \ - verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleAirplaneMode] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleAirplaneModeNatMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag). - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode. - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ResultFlag: " + resultFlag) - # print(resultFlag) - # reportResultFlag.reportFlag = resultFlag - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.open - @pytest.mark.fiveg - def test_ToogleAirplaneMode_5g_OPEN_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_ToogleAirplaneMode_2g_OPEN_NAT(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # print("ReportFlag: " + resultFlag) - # setReportResultFlag(resultFlag) - - # Toggle AirplaneMode - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - assert verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index f6157767a..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,342 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - ,pytest.mark.ToggleAirplaneMode, pytest.mark.nat, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeNatModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and nat and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6561", name="WIFI-6561") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6562", name="WIFI-6562") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleAirplaneMode_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6563", name="WIFI-6563") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6564", name="WIFI-6564") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleAirplaneMode_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6559", name="WIFI-6559") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6560", name="WIFI-6560") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleAirplaneMode_2g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py deleted file mode 100644 index a7a0826c6..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,626 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.ToggleAirplaneMode, pytest.mark.nat] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteOneNat(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6549", name="WIFI-6549") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6550", name="WIFI-6550") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6553", name="WIFI-6553") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleAirplaneMode_5g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6554", name="WIFI-6554") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleAirplaneMode_2g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6569", name="WIFI-6569") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleAirplaneMode_5g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6570", name="WIFI-6570") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleAirplaneMode_2g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="NAT Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteNatTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and nat and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6551", name="WIFI-6551") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_5g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6552", name="WIFI-6552") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_2g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6555", name="WIFI-6555") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6556", name="WIFI-6556") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6557", name="WIFI-6557") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6558", name="WIFI-6558") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..78d28b52a --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_enterprise_ttls.py @@ -0,0 +1,308 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging + +import allure +import pytest + +import random +import string +import time + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.nat, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "NAT", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("NAT MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeToggleAirplaneEnterpriseTTLSSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.story('wpa enterprise 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.story('wpa enterprise 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.story('wpa2 enterprise 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa2 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa2_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.story('wpa2 enterprise 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa2 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa2_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.story('wpa3 enterprise 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.story('wpa3 enterprise 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + +setup_params_enterprise_two_nat = { + "mode": "NAT", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"]}] + }, + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise_two_nat['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_nat['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("NAT MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_nat], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeEnterpriseTTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + """ + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_enterprise_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_nat_wpa_wpa2_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_enterprise_mixed 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_wpa2_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_enterprise_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_enterprise_mixed 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_nat["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..2e93584e8 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_airplane_mode_test/test_general_security_modes.py @@ -0,0 +1,325 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging + +import allure +import pytest + +import random +import time +import string + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.nat, pytest.mark.general] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa": [{"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa2_personal": [{"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("NAT MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeToggleAirplaneSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.open + @pytest.mark.twog + @allure.story('open 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_open_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @allure.story('open 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_open_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa2_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa2_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + +setup_params_general_two_nat = { + "mode": "NAT", + "ssid_modes": { + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g_nat", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two_nat['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_nat['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two_nat['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("NAT MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_nat], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestNatModeToggleAirplaneSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteB" + """ + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_personal_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_wpa2_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_personal 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa_wpa2_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "twog" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("NAT Mode Toggle Airplane Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_nat_wpa3_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + + profile_data = setup_params_general_two_nat["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "NAT" + band = "fiveg" + + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_ToggleWifiMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_ToggleWifiMode.py deleted file mode 100644 index 765c9b5a1..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_ToggleWifiMode.py +++ /dev/null @@ -1,216 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, - pytest.mark.ToggleWifiMode] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, \ - ForgetWifiConnection, openApp - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleWifiMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.fiveg - def test_ToogleWifiMode_5g_OPEN(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) - - @pytest.mark.open - @pytest.mark.twog - def test_ToogleWifiMode_2g_OPEN(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - # Toggle Wifi Mode - assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData) diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index 731a39a42..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidNatModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6506", name="WIFI-6506") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_5g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6507", name="WIFI-6507") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_2g_WPA2_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6508", name="WIFI-6508") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_5g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6509", name="WIFI-6509") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_2g_WPA3_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6504", name="WIFI-6504") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_5g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6505", name="WIFI-6505") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_2g_WPA_enterprise_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_general_security_modes.py deleted file mode 100644 index e77be3bc6..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,630 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidNatModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6491", name="WIFI-6491") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6492", name="WIFI-6492") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6493", name="WIFI-6493") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6494", name="WIFI-6494") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_Personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6495", name="WIFI-6495") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleWifiMode_5g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6496", name="WIFI-6496") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleWifiMode_2g_Open_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Nat Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidNatModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6497", name="WIFI-6497") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_5g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6498", name="WIFI-6498") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_2g_wpa3_personal_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6499", name="WIFI-6499") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_5g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6500", name="WIFI-6500") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_2g_wpa3_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6501", name="WIFI-6501") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_5g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6502", name="WIFI-6502") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_2g_wpa_wpa2_personal_mixed_Nat(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode.py deleted file mode 100644 index c22e1eb07..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode.py +++ /dev/null @@ -1,238 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleWifiMode] - -from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \ - verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "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") -class TestToggleWifiModeNatMode(object): - - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode. - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode. - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi. - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleWifiMode_5g_OPEN_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - - @pytest.mark.twog - @pytest.mark.open - def test_ToogleWifiMode_2g_OPEN_NAT(self, request, get_vif_state, get_ToggleWifiMode_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleWifiMode_data - - # Set Wifi/AP Mode - set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - # Toggle WifiMode - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - - # Verify AP After AirplaneMode. - value = verify_APconnMobileDevice_iOS(request, ssidName, setup_perfectoMobile_iOS, connData) - assert value - - # ForgetWifi - ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 2abc67ebf..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,342 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.nat, pytest.mark.enterprise, pytest.mark.ToggleWifiMode] - -setup_params_enterprise = { - "mode": "NAT", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="NAT Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeNatModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and nat and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6619", name="WIFI-6619") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6620", name="WIFI-6620") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleWifiMode_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6623", name="WIFI-6623") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6624", name="WIFI-6624") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleWifiMode_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6621", name="WIFI-6621") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6622", name="WIFI-6622") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleWifiMode_2g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py deleted file mode 100644 index ab23852a4..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,626 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.nat, pytest.mark.ToggleWifiMode] - -setup_params_general = { - "mode": "NAT", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something"}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Nat Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("NAT MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeSuiteOneNat(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6609", name="WIFI-6609") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6610", name="WIFI-6610") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6607", name="WIFI-6607") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleWifiMode_5g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6608", name="WIFI-6608") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleWifiMode_2g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6613", name="WIFI-6613") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleWifiMode_5g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6614", name="WIFI-6614") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleWifiMode_2g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "NAT", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="NAT Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("NAT MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteNatTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6611", name="WIFI-6611") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_5g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6612", name="WIFI-6612") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_2g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6615", name="WIFI-6615") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_5g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6616", name="WIFI-6616") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_2g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6617", name="WIFI-6617") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_5g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6618", name="WIFI-6618") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_2g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..4667ba72c --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_enterprise_ttls.py @@ -0,0 +1,144 @@ +""" + Toggle Wifi Mode : NAT Mode + pytest -m "toggle_wifi_mode and nat and enterprise" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.nat, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "NAT", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]}, + + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("NAT MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeNatModeSuiteOne(object): + + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6506", name="WIFI-6506") + def test_ToggleWifiMode_WPA2_enterprise_5g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6507", name="WIFI-6507") + def test_ToggleWifiMode_WPA2_enterprise_2g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6504", name="WIFI-6504") + def test_ToggleWifiMode_WPA_enterprise_5g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6505", name="WIFI-6505") + def test_ToggleWifiMode_WPA_enterprise_2g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6508", name="WIFI-6508") + def test_ToggleWifiMode_wpa3_enterprise_5g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + @allure.title("NAT Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6509", name="WIFI-6509") + def test_ToggleWifiMode_wpa3_enterprise_2g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..af72a8840 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/nat_mode/toggle_wifi_mode_test/test_general_security_modes.py @@ -0,0 +1,253 @@ +""" + Toggle Wifi Mode : NAT Mode + pytest -m "toggle_wifi_mode and nat and general" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.nat, pytest.mark.general] + +setup_params_general = { + "mode": "NAT", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}], + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("NAT MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeNatModeSuiteOne(object): + + @pytest.mark.twog + @pytest.mark.wpa2_personal + @allure.title("NAT Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6492", name="WIFI-6492") + def test_ToggleWifiMode_WPA2_Personal_2g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @allure.title("NAT Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6491", name="WIFI-6491") + def test_ToggleWifiMode_WPA2_Personal_5g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa + @allure.title("NAT Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6494", name="WIFI-6494") + def test_ToggleWifiMode_WPA_2g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa + @allure.title("NAT Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6493", name="WIFI-6493") + def test_ToggleWifiMode_WPA_5g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.open + @allure.title("NAT Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6496", name="WIFI-6496") + def test_ToggleWifiMode_open_2g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.open + @allure.title("NAT Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6495", name="WIFI-6495") + def test_ToggleWifiMode_open_5g_Nat(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + +setup_params_general_two = { + "mode": "NAT", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], "security_key": "something"}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], "security_key": "something"}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two['ssid_modes'].keys(): + for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): + N = 2 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string + +@pytest.mark.InteropsuiteB +@allure.feature("NAT MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeNatModeSuiteTwo(object): + """ + Nat Toggle Wifi-Mode (wpa3_personal. wpa3_personal_mixed. wpa_wpa2_personal_mixed) (twog, fiveg) + pytest -m "toggle_wifi_mode and nat and SuiteTwo" + """ + @pytest.mark.twog + @pytest.mark.wpa3_personal + @allure.title("NAT Mode Toggle Wifi Button Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6498", name="WIFI-6498") + def test_ToggleWifiMode_WPA3_Personal_2g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal + @allure.title("NAT Mode Toggle Wifi Button Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6497", name="WIFI-6497") + def test_ToggleWifiMode_WPA3_Personal_5g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_personal_mixed + @allure.title("NAT Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6500", name="WIFI-6500") + def test_ToggleWifiMode_WPA3_Personal_Mixed_2g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal_mixed + @allure.title("NAT Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6499", name="WIFI-6499") + def test_ToggleWifiMode_WPA3_Personal_Mixed_5g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("NAT Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6502", name="WIFI-6502") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_2g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("NAT Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6501", name="WIFI-6501") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_5g_Nat(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_enterprise_ttls.py deleted file mode 100644 index 8a8d3766b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,501 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_eap_and - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} - - -# class TestUniqueSSIDEnterpriseVLANAND(object): -# -# @pytest.mark.unique_ssid_enterprise_vlan_and -# def test_unique_ssid_enterprise_vlan_and(self): -# for sec_modes in setup_params_enterprise['ssid_modes'].keys(): -# for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - - -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4845", name="WIFI-4845") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnect_5g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4841", name="WIFI-4841") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4847", name="WIFI-4847") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnect_5g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4846", name="WIFI-4846") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4850", name="WIFI-4850") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnect_5g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4849", name="WIFI-4849") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_enterprise_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_m_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "wpa3_m_eap_5g", "appliedRadios": ["5G"], "vlan": 100}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDVlanEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_vlan_and -# def test_unique_ssid_vlan_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect: Suite-B") -@pytest.mark.suiteB -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and bridge and enterprise and ttls and suiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7426", name="WIFI-7426") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_enterprise_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7425", name="WIFI-7425") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_enterprise_mixed_Vlan(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7428", name="WIFI-7428") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_enterprise_mixed_Vlan(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7420", name="WIFI-7420") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_enterprise_mixed_Vlan(self, request, get_vif_state, - get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py deleted file mode 100644 index 25fa6190a..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py +++ /dev/null @@ -1,552 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralOneVLANAND(object): -# -# @pytest.mark.unique_ssid_general_one_vlan_and -# def test_unique_ssid_general_one_vlan(self): -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - -# for sec_modes in setup_params_general['ssid_modes'].keys(): -# for i in range(len(setup_params_general['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N)))+str(int(time.time_ns())%10000) -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectSuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4613", name="WIFI-4613") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4612", name="WIFI-4612") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4611", name="WIFI-4611") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4609", name="WIFI-4609") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4607", name="WIFI-4607") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4606", name="WIFI-4606") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa3_p_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} -# class TestUniqueSSIDGeneralTwoVLANAND(object): -# -# @pytest.mark.unique_ssid_general_two_vlan_and -# def test_unique_ssid_general_two_vlan_And(self): -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - - # assert True - -# for sec_modes in setup_params_general_two['ssid_modes'].keys(): -# for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): -# N = 2 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N)))+str(int(time.time_ns())%10000) -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectSuiteTwo(object): - """ Client Connect SuiteA - pytest -m "client_connect and vlan and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4617", name="WIFI-4617") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4616", name="WIFI-4616") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4623", name="WIFI-4623") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4621", name="WIFI-4621") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4625", name="WIFI-4625") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4624", name="WIFI-4624") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index bb3d1e97b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,501 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connect - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} -# class TestUniqueSSIDEnterpriseVLANiOS(object): -# -# @pytest.mark.unique_ssid_enterprise_vlan_ios -# def test_unique_ssid_enterprise_vlan_ios(self): -# for sec_modes in setup_params_enterprise['ssid_modes'].keys(): -# for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and vlan and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4703", name="WIFI-4703") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA2_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4702", name="WIFI-4702") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnect_2g_WPA2_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4707", name="WIFI-4707") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA3_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4706", name="WIFI-4706") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnect_2g_WPA3_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4706", name="WIFI-4706") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnect_5g_WPA_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4705", name="WIFI-4705") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnect_2g_WPA_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_enterprise_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa_wpa2_enterprise_mixed": [ - {"ssid_name": "wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise_mixed": [ - {"ssid_name": "wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100}] - }, - "rf": {}, - "radius": True -} -# class TestUniqueSSIDVlanEnterpriseTwoAnd(object): -# -# @pytest.mark.unique_ssid_enterprise_two_vlan_and -# def test_unique_ssid_vlan_and(self): -for sec_modes in setup_params_enterprise_two['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise_two['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N))) + str(int(time.time_ns()) % 10000) - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ - setup_params_enterprise_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string - # assert True - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connect : Suite-B") -@pytest.mark.suiteB -@pytest.mark.mixed_eap -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeEnterpriseTTLSSuiteTwo(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7430", name="WIFI-7430") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa_wpa2_eap_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7429", name="WIFI-7429") - @pytest.mark.wpa_wpa2_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa_wpa2_eap_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7432", name="WIFI-7432") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.twog - def test_ClientConnect_2g_wpa3_eap_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7431", name="WIFI-7431") - @pytest.mark.wpa3_enterprise_mixed - @pytest.mark.fiveg - def test_ClientConnect_5g_wpa3_eap_mixed_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py deleted file mode 100644 index 2e8e6093f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py +++ /dev/null @@ -1,548 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connect, pytest.mark.interop_uc_sanity, pytest.mark.vlan] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} -# class TestUniqueSSIDGeneralOneVLANiOS(object): -# -# @pytest.mark.unique_ssid_general_one_vlan_ios -# def test_unique_ssid_general_one_vlan_ios(self): -# for sec_modes in setup_params_general['ssid_modes'].keys(): -# for i in range(len(setup_params_general['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# assert True - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectSuiteOneVlan(object): - """ Client Connect SuiteA - pytest -m "client_connect and vlan and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4594", name="WIFI-4594") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnect_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4593", name="WIFI-4593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4586", name="WIFI-4586") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnect_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4585", name="WIFI-4585") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnect_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4583", name="WIFI-4583") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnect_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - #Toggle AirplaneMode - # assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_iOS, connData) - - #ForgetWifi - # ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData) - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4581", name="WIFI-4581") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnect_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa3_p_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} - -# class TestUniqueSSIDGeneralTwoVLANiOS(object): -# -# @pytest.mark.unique_ssid_general_two_vlan_ios -# def test_unique_ssid_general_two_vlan_ios(self): -# for sec_modes in setup_params_general_two['ssid_modes'].keys(): -# for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): -# N = 3 -# rand_string = (''.join(random.choices(string.ascii_uppercase + -# string.digits, k=N))) + str(int(time.time_ns()) % 10000) -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = \ -# setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string -# -# assert True - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectSuiteTwo(object): - """ Client Connect SuiteB - pytest -m "client_connect and vlan and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4596", name="WIFI-4596") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnect_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4595", name="WIFI-4595") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnect_2g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4598", name="WIFI-4598") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_5g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4597", name="WIFI-4597") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnect_2g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4600", name="WIFI-4600") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_5g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4599", name="WIFI-4599") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_enterprise_ttls.py new file mode 100644 index 000000000..2eedef706 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_enterprise_ttls.py @@ -0,0 +1,331 @@ +""" + + Client Connect : VLAN Mode + pytest -m "client_connect_tests and nat and enterprise" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.vlan, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "VLAN", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, + + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("VLAN MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeConnectSuiteA(object): + """ + Vlan Client Connect (open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connect_tests and vlan and enterprise" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.title("VLAN Mode Client Connect Test for wpa enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_vlan_wpa_eap_2g_client_connect(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + """ + VLAN Mode Client Connect Test with open encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and open and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.title("VLAN Mode Client Connect Test for wpa enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4566", name="JIRA LINK") + def test_vlan_wpa_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with open encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and open and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.title("VLAN Mode Client Connect Test for wpa2 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4567", name="JIRA LINK") + def test_vlan_wpa2_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connectivity_tests and vlan and enterprise and wpa and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.title("VLAN Mode Client Connect Test Test for wpa2 enterprise 5 GHzd") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4568", name="JIRA LINK") + def test_vlan_wpa2_eap_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.title("VLAN Mode Client Connect Test for wpa3 enterprise 2.4 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4569", name="JIRA LINK") + def test_vlan_wpa3_eap_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa2_personal and twog" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.title("VLAN Mode Client Connect Test for wpa3 enterprise 5 GHz") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4570", name="JIRA LINK") + def test_vlan_wpa3_eap_5g_client_connect(self, get_test_device_logs, get_dut_logs_per_test_case, + num_stations, setup_configuration, get_test_library, radius_info): + """ + VLAN Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa2_personal and fiveg" + """ + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + assert passes == "PASS", result + + +setup_params_enterprise_two_vlan = { + "mode": "VLAN", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100}] + }, + "rf": {}, + "radius": True +} +for sec_modes in setup_params_enterprise_two_vlan['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_vlan['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_enterprise_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_enterprise_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + + +@allure.feature("VLAN MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="Enterprise security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_vlan], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeConnectSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect_tests and vlan and suiteB" + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7410", name="JIRA LINK") + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band") + def test_vlan_wpa_wpa2_eap_mixed_2g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa3_personal and twog" + """ + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4572", name="JIRA LINK") + def test_vlan_wpa_wpa2_eap_mixed_5g_client_connect(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa3_personal and fiveg" + """ + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4573", name="JIRA LINK") + def test_vlan_wpa3_eap_mixed_2g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa3_personal_mixed and twog" + """ + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4574", name="JIRA LINK") + def test_vlan_wpa3_eap_mixed_5g_client_connect(self, get_test_library, + get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, radius_info): + """ + VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and enterprise and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + identity = radius_info['user'] + passes, result = get_test_library.enterprise_client_connect(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_general_security_modes.py new file mode 100644 index 000000000..49c60b590 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/test_general_security_modes.py @@ -0,0 +1,421 @@ +""" + + Client Connect and tcp-udp Traffic Test: VLAN Mode + pytest -m "client_connect_tests and vlan and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.client_connect_tests, pytest.mark.vlan, pytest.mark.general] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + + +@allure.feature("VLAN MODE CLIENT CONNECTIVITY") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeConnectSuiteA(object): + """ + VLAN Client Connect(open. wpa. wpa2_personal) (twog, fiveg) + pytest -m "client_connect and vlan and general " + """ + + @pytest.mark.open + @pytest.mark.twog + @allure.story('OPEN 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4606", name="JIRA LINK") + def test_vlan_open_2g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with open encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and open and twog" + """ + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @allure.story('OPEN 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4607", name="JIRA LINK") + def test_vlan_open_5g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with open encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and open and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4609", name="JIRA LINK") + def test_vlan_wpa_2g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4611", name="JIRA LINK") + def test_vlan_wpa_5g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4612", name="JIRA LINK") + def test_vlan_wpa2_personal_2g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4613", name="JIRA LINK") + def test_vlan_wpa2_personal_5g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa2_personal encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + +setup_params_general_two_vlan = { + "mode": "VLAN", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100}] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general_two_vlan['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_vlan['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N))) + str(int(time.time_ns()) % 10000) + setup_params_general_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] = \ + setup_params_general_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] + "_" + rand_string + +@allure.feature("VLAN MODE CLIENT CONNECT") +@allure.parent_suite("Client Connect Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Client Connect") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_vlan], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVLANModeConnectSuiteTwo(object): + """" + VLAN Client Connect (wpa3_personal. wpa3_personal_mixed. wpa_wpa2_personal_mixed) (twog, fiveg) + pytest -m "client_connect_tests and vlan and general" + """ + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4616", name="JIRA LINK") + def test_vlan_wpa3_personal_2g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa3_personal and twog" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4617", name="JIRA LINK") + def test_vlan_wpa3_personal_5g_client_connect(self, get_test_library, num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa3_personal encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4621", name="JIRA LINK") + def test_vlan_wpa3_personal_mixed_2g_client_connect(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa3_personal_mixed and twog" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4623", name="JIRA LINK") + def test_vlan_wpa3_personal_mixed_5g_client_connect(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa3_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa3_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4624", name="JIRA LINK") + def test_vlan_wpa_wpa2_personal_mixed_2g_client_connect(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa_wpa2_personal_mixed and twog" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa wpa2 personal mixed 5 GHZ Band') + @allure.title("VLAN Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4625", name="JIRA LINK") + def test_vlan_wpa_wpa2_personal_mixed_5g_client_connect(self, get_test_library, + num_stations, get_dut_logs_per_test_case, + get_test_device_logs, + setup_configuration): + """ + VLAN Mode Client Connect Test with wpa_wpa2_personal_mixed encryption 5 GHz Band + pytest -m "client_connect_tests and vlan and general and wpa_wpa2_personal_mixed and fiveg" + """ + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.client_connect(ssid=ssid_name, security=security, + dut_data=setup_configuration, + extra_securities=extra_secu, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_enterprise_ttls.py deleted file mode 100644 index 2ea33dc75..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,300 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_eap_and, verifyUploadDownloadSpeed_android, wifi_connect_eap, wifi_disconnect_and_forget - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeEnterpriseTTLSSuiteA(object): - """ Client Connect SuiteA - pytest -m "client_connect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4679", name="WIFI-4679") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_5g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4678", name="WIFI-4678") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4683", name="WIFI-4683") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_5g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4682", name="WIFI-4682") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4681", name="WIFI-4681") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_5g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4680", name="WIFI-4680") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - ip, is_internet = get_ip_address_eap_and(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, - connData) - # Set Wifi/AP Mode - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py deleted file mode 100644 index 5bd560df0..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/android/test_general_security_modes.py +++ /dev/null @@ -1,560 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connectivity : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectivitySuiteOne(object): - """ Client Connect SuiteA - pytest -m "client_connectivity and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4631", name="WIFI-4631") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4630", name="WIFI-4630") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4629", name="WIFI-4629") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4630", name="WIFI-4630") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4627", name="WIFI-4627") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4626", name="WIFI-4626") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("Vlan MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectivitySuiteTwo(object): - """ Client Connect SuiteB - pytest -m "client_connect and vlan and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4632", name="WIFI-4632") - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_ClientConnectivity_wpa3_personal_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4633", name="WIFI-4633") - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_ClientConnectivity_wpa3_personal_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4634", name="WIFI-4634") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.twog - def test_ClientConnectivity_wpa3_personal_mixed_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4635", name="WIFI-4635") - @pytest.mark.wpa3_personal_mixed - @pytest.mark.fiveg - def test_ClientConnectivity_wpa3_personal_mixed_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4636", name="WIFI-4636") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.twog - def test_ClientConnectivity_wpa_wpa2_personal_ssid_2g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4637", name="WIFI-4637") - @pytest.mark.wpa_wpa2_personal_mixed - @pytest.mark.fiveg - def test_ClientConnectivity_wpa_wpa2_personal_ssid_5g_Vlan(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 84a2f7b51..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,309 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_eap_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_connectivity - ,pytest.mark.interop_uc_sanity, pytest.mark.vlan, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client Connectivity : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_connect and vlan and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4829", name="WIFI-4829") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA2_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword,setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4828", name="WIFI-4828") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ClientConnectivity_2g_WPA2_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4833", name="WIFI-4833") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA3_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4832", name="WIFI-4832") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ClientConnectivity_2g_WPA3_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4831", name="WIFI-4831") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ClientConnectivity_5g_WPA_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and vlan and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword,setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4830", name="WIFI-4830") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ClientConnectivity_2g_WPA_Eap_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect_eap(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py deleted file mode 100644 index 6d3b3682b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connectivity_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,523 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException - -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_connectivity, pytest.mark.interop_uc_sanity, pytest.mark.vlan] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "vlan": 100}], - "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectSuiteOneVlan(object): - """ Client Connect SuiteA - pytest -m "client_connect and vlan and InteropsuiteA" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4610", name="WIFI-4610") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ClientConnectivity_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4608", name="WIFI-4608") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnectivity_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4604", name="WIFI-4604") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ClientConnectivity_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4603", name="WIFI-4603") - @pytest.mark.twog - @pytest.mark.wpa - def test_ClientConnectivity_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4602", name="WIFI-4602") - @pytest.mark.fiveg - @pytest.mark.open - def test_ClientConnectivity_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4601", name="WIFI-4601") - @pytest.mark.twog - @pytest.mark.open - def test_ClientConnectivity_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - assert verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} - - -@allure.suite(suite_name="interop sanity") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Connectivity : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT CONNECTIVITY") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestVlanModeConnectivitySuiteTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_connectivity and vlan and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4615", name="WIFI-4615") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ClientConnectivity_5g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4614", name="WIFI-4614") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ClientConnectivity_2g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4619", name="WIFI-4619") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_5g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4618", name="WIFI-4618") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ClientConnectivity_2g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4622", name="WIFI-4622") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_5g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - #Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4620", name="WIFI-4620") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ClientConnectivity_2g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/test_rate_limiting.py deleted file mode 100644 index ba19640e2..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/android/test_rate_limiting.py +++ /dev/null @@ -1,304 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import sys -import allure -import string - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, - pytest.mark.rate_limiting, pytest.mark.vlan] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, \ - get_ip_address_and, return_upload_download_speed_android, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_android - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("VLAN MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingVLAN(object): - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - down_speed, up_speed = ookla_speed_test_android(request, setup_perfectoMobile_android, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/test_rate_limiting.py deleted file mode 100644 index 8fad7c57f..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/iOS/test_rate_limiting.py +++ /dev/null @@ -1,306 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - return_upload_download_speed_iOS, get_ip_address_ios, wifi_connect, wifi_disconnect_and_forget, ookla_speed_test_iOS - -pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.rate_limiting, pytest.mark.vlan] -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa2_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa": [ - {"ssid_name": "ssid_wpa_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ], - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_2g_RL", - "appliedRadios": ["2G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - }, - {"ssid_name": "ssid_wpa3_5g_RL", - "appliedRadios": ["5G"], - "security_key": "something", - "vlan": 100, - "rate-limit": { - "ingress-rate": 60, - "egress-rate": 10 - } - } - ] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.feature("VLAN MODE Rate Limiting") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestRateLimitingVLAN(object): - - - @pytest.mark.wpa2_personal - @pytest.mark.twog - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa2_personal - @pytest.mark.fiveg - @pytest.mark.ow_sanity_interop - def test_rate_limiting_wpa2_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.twog - def test_rate_limiting_wpa_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa - @pytest.mark.fiveg - def test_rate_limiting_wpa_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.twog - def test_rate_limiting_wpa3_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False - - @pytest.mark.wpa3_personal - @pytest.mark.fiveg - def test_rate_limiting_wpa3_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - up_rate = profile_data["rate-limit"]["ingress-rate"] - down_rate = profile_data["rate-limit"]["egress-rate"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - print("Upload rate:" + (str)(up_rate)) - print("Download rate:" + (str)(down_rate)) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - down_speed, up_speed = ookla_speed_test_iOS(request, setup_perfectoMobile_iOS, connData) - wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - print(down_speed, up_speed) - if float(down_speed) < float(down_rate) and float(up_speed) < float(up_rate): - assert True - else: - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py new file mode 100644 index 000000000..44ecb64e9 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/rate_limiting/test_rate_limiting.py @@ -0,0 +1,251 @@ +""" + Rate Limiting : VLAN Mode + pytest -m "rate_limiting_tests and vlan and general" + +""" +import logging +import random +import string +import time + +import allure +import pytest + +pytestmark = [pytest.mark.vlan, pytest.mark.general] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa2_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa": [ + {"ssid_name": "ssid_wpa_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ], + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_2g_RL", + "appliedRadios": ["2G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + }, + {"ssid_name": "ssid_wpa3_5g_RL", + "appliedRadios": ["5G"], + "security_key": "something", + "vlan": 100, + "rate-limit": { + "ingress-rate": 60, + "egress-rate": 10 + } + } + ] + }, + "rf": {}, + "radius": False +} +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string +@allure.feature("VLAN MODE RATE LIMITING") +@allure.parent_suite("Rate Limiting Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Rate Limiting") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestRateLimitingVlan(object): + """ + VLAN MODE Rate Limiting (wpa. wpa2. wpa3) (twog, fiveg) + pytest -m "rate_limiting_tests and vlan and general" + """ + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7016", name="JIRA LINK") + def test_rate_limiting_wpa_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "VLAN" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7017",name="JIRA LINK") + def test_rate_limiting_wpa_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa encryption 5 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa" + mode = "VLAN" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7016", name="JIRA LINK") + def test_rate_limiting_wpa2_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa2_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa2_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "VLAN" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @pytest.mark.ow_sanity_interop + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7017", name="JIRA LINK") + def test_rate_limiting_wpa2_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa2_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa2_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7016", name="JIRA LINK") + def test_rate_limiting_wpa3_2g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa3_personal encryption 2.4 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa3_personal and twog" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "VLAN" + band = "twog" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("Vlan Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7017", name="JIRA LINK") + def test_rate_limiting_wpa3_5g(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + """ + VLAN Mode Rate Limiting Test with wpa3_personal encryption 5 GHz Band + pytest -m "rate_limiting_tests and vlan and general and wpa3_personal and fiveg" + """ + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + up_rate = profile_data["rate-limit"]["ingress-rate"] + down_rate = profile_data["rate-limit"]["egress-rate"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + + passes, result = get_test_library.rate_limiting_test(ssid=ssid_name, passkey=security_key, up_rate=up_rate, + down_rate=down_rate) + assert passes == "PASS", result + diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index c3a420c08..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.enterprise, pytest.mark.vlan] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidVlanModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and Vlan and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6450", name="WIFI-6450") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_5g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6451", name="WIFI-6451") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleAirplaneMode_2g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6452", name="WIFI-6452") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_5g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6453", name="WIFI-6453") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleAirplaneMode_2g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6448", name="WIFI-6448") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_5g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6449", name="WIFI-6449") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleAirplaneMode_2g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_general_security_modes.py deleted file mode 100644 index 08fcaea4b..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,631 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.vlan] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLANMODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidVlanModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and vlan and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6436", name="WIFI-6436") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6437", name="WIFI-6437") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleAirplaneMode_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6438", name="WIFI-6438") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleAirplaneMode_5g_WPA_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6439", name="WIFI-6439") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleAirplaneMode_2g_WPA_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6440", name="WIFI-6440") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleAirplaneMode_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6441", name="WIFI-6441") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleAirplaneMode_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something"}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeAndroidVlanModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and Vlan and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6442", name="WIFI-6442") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6443", name="WIFI-6443") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleAirplaneMode_2g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6444", name="WIFI-6444") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_5g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6445", name="WIFI-6445") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleAirplaneMode_2g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6446", name="WIFI-6446") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_5g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6447", name="WIFI-6447") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleAirplaneMode_2g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index d967b2d07..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,342 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - ,pytest.mark.ToggleAirplaneMode, pytest.mark.vlan, pytest.mark.enterprise] - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="VLAN Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeVlanModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and vlan and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6585", name="WIFI-6585") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6586", name="WIFI-6586") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleAirplaneMode_2g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6587", name="WIFI-6587") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6588", name="WIFI-6588") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleAirplaneMode_2g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6583", name="WIFI-6583") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleAirplaneMode_5g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6584", name="WIFI-6584") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleAirplaneMode_2g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py deleted file mode 100644 index ed2d9a168..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,623 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.ToggleAirplaneMode, pytest.mark.vlan] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteOneVLAN(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and vlan and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6571", name="WIFI-6571") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6572", name="WIFI-6572") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleAirplaneMode_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6575", name="WIFI-6575") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleAirplaneMode_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6576", name="WIFI-6576") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleAirplaneMode_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6577", name="WIFI-6577") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleAirplaneMode_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6578", name="WIFI-6578") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleAirplaneMode_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="VLAN Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteVLANTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and vlan and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6573", name="WIFI-6573") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_5g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6574", name="WIFI-6574") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleAirplaneMode_2g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6579", name="WIFI-6579") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6580", name="WIFI-6580") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6581", name="WIFI-6581") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6582", name="WIFI-6582") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..95bfd905a --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_enterprise_ttls.py @@ -0,0 +1,308 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging + +import allure +import pytest + +import random +import string +import time + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.vlan, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "VLAN", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, + + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("VLAN MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeToggleAirplaneEnterpriseTTLSSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.wpa_enterprise + @pytest.mark.twog + @allure.story('wpa enterprise 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_enterprise + @pytest.mark.fiveg + @allure.story('wpa enterprise 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @allure.story('wpa2 enterprise 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa2 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa2_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_enterprise + @pytest.mark.fiveg + @allure.story('wpa2 enterprise 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa2 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa2_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.twog + @allure.story('wpa3 enterprise 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3 enterprise encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_enterprise_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise + @pytest.mark.fiveg + @allure.story('wpa3 enterprise 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3 enterprise encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_enterprise_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, + radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + # security_key = "[BLANK]" + security = "wpa" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + +setup_params_enterprise_two_vlan = { + "mode": "VLAN", + "ssid_modes": { + "wpa_wpa2_enterprise_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa3_enterprise_mixed": [ + {"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100}] + }, + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise_two_vlan['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise_two_vlan['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("VLAN MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="Enterprise ttls Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise_two_vlan], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeEnterpriseTTLSSuiteTwo(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity and bridge and enterprise and ttls and suiteB" + """ + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_enterprise_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-4565", name="JIRA LINK") + def test_vlan_wpa_wpa2_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_enterprise_mixed 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa_wpa2_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_wpa2_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.twog + @allure.story('wpa3_enterprise_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_enterprise_mixed_2g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa3_enterprise_mixed"][0] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_enterprise_mixed + @pytest.mark.fiveg + @allure.story('wpa3_enterprise_mixed 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_enterprise_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_enterprise_mixed_5g_toggle_airplane(self, get_test_library, get_dut_logs_per_test_case, + get_test_device_logs, num_stations, setup_configuration, radius_info): + profile_data = setup_params_enterprise_two_vlan["ssid_modes"]["wpa3_enterprise_mixed"][1] + ssid_name = profile_data["ssid_name"] + # security_key = profile_data["#security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + ttls_passwd = radius_info["password"] + identity = radius_info["user"] + passes, result = get_test_library.enterprise_toggle_airplane_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..303c332af --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_airplane_mode_test/test_general_security_modes.py @@ -0,0 +1,363 @@ +""" + + Client Connect : BRIDGE Mode + pytest -m "client_connect_tests and nat and general" + +""" +import logging + +import allure +import pytest + +import random +import time +import string + +pytestmark = [pytest.mark.toggle_airplane_tests, pytest.mark.vlan, pytest.mark.general] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "open": [{"ssid_name": "ssid_open_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_open_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa": [{"ssid_name": "ssid_wpa_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa2_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("VLAN MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeToggleAirplaneSuiteOne(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteA" + """ + + @pytest.mark.open + @pytest.mark.twog + @allure.story('open 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_open_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.open + @pytest.mark.fiveg + @allure.story('open 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_open_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + security = "open" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.twog + @allure.story('wpa 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa + @pytest.mark.fiveg + @allure.story('wpa 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.twog + @allure.story('wpa2_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa2_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa2_personal + @pytest.mark.fiveg + @allure.story('wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa2_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa2" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + +setup_params_general_two_vlan = { + "mode": "VLAN", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", + "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", + "vlan": 100}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two_vlan['ssid_modes'].keys(): + for i in range(len(setup_params_general_two_vlan['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two_vlan['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.feature("VLAN MODE TOGGLE AIRPLANE") +@allure.parent_suite("Toggle Airplane Tests") +@allure.suite(suite_name="VLAN Mode") +@allure.sub_suite(sub_suite_name="General security mode Toggle Airplane") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two_vlan], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestVlanModeToggleAirplaneSuiteTwo(object): + """ Client Connect SuiteA + pytest -m "client_connect and bridge and InteropsuiteB" + """ + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.twog + @allure.story('wpa_wpa2_personal_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_wpa2_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa_wpa2_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa_wpa2_personal 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa_wpa2_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa" + extra_secu = ["wpa2"] + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @allure.story('wpa3_personal 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_personal_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal + @pytest.mark.fiveg + @allure.story('wpa3_personal 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_personal_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.twog + @allure.story('wpa3_personal_mixed 2.4 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_personal_mixed_2g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "twog" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result + + @pytest.mark.wpa3_personal_mixed + @pytest.mark.fiveg + @allure.story('wpa3_personal_mixed 5 GHZ Band') + @allure.title("VLAN Mode Toggle Airplane Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11102", name="JIRA LINK") + def test_vlan_wpa3_personal_mixed_5g_toggle_airplane(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + + profile_data = setup_params_general_two_vlan["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + security = "wpa3" + mode = "VLAN" + band = "fiveg" + vlan = [100] + passes, result = get_test_library.toggle_airplane_mode_test(ssid=ssid_name, security=security, + dut_data=setup_configuration, + passkey=security_key, mode=mode, band=band, + num_sta=num_stations, vlan_id=vlan) + allure.attach(name="Test result", body=str(result)) + + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py deleted file mode 100644 index 348706c58..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py +++ /dev/null @@ -1,332 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import string -import random -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidVlanModeEnterpriseTTLSSuiteA(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6524", name="WIFI-6524") - @pytest.mark.fiveg - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_5g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - #ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - #print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6525", name="WIFI-6525") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToogleWifiMode_2g_WPA2_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6526", name="WIFI-6526") - @pytest.mark.fiveg - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_5g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6527", name="WIFI-6527") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToogleWifiMode_2g_WPA3_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6522", name="WIFI-6522") - @pytest.mark.fiveg - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_5g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6523", name="WIFI-6523") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToogleWifiMode_2g_WPA_enterprise_Vlan(self, request, get_vif_state, get_ToggleAirplaneMode_data, - setup_perfectoMobile_android, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ttls_passwd, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_general_security_modes.py deleted file mode 100644 index daa972d74..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/android/test_general_security_modes.py +++ /dev/null @@ -1,630 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ - gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client ReConnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidVlanModeSuiteOne(object): - """ Client ReConnect SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6510", name="WIFI-6510") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_5g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6511", name="WIFI-6511") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToogleWifiMode_2g_WPA2_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6512", name="WIFI-6512") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToogleWifiMode_5g_WPA_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6513", name="WIFI-6513") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToogleWifiMode_2g_WPA_Personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6514", name="WIFI-6514") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToogleWifiMode_5g_Open_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6515", name="WIFI-6515") - @pytest.mark.twog - @pytest.mark.open - def test_ToogleWifiMode_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} - -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client ReConnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeAndroidVlanModeSuiteTwo(object): - """ Client ReConnect SuiteA - pytest -m "client_connect and bridge and InteropsuiteB" - """ - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6516", name="WIFI-6516") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_5g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6517", name="WIFI-6517") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToogleWifiMode_2g_wpa3_personal_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6518", name="WIFI-6518") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_5g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6519", name="WIFI-6519") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToogleWifiMode_2g_wpa3_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6520", name="WIFI-6520") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_5g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6521", name="WIFI-6521") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToogleWifiMode_2g_wpa_wpa2_personal_mixed_Vlan(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid(request, ssidName, ssidPassword, - setup_perfectoMobile_android, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/__init__.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py deleted file mode 100644 index 86e6789ae..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py +++ /dev/null @@ -1,342 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.vlan, pytest.mark.enterprise, pytest.mark.ToggleWifiMode] - -setup_params_enterprise = { - "mode": "VLAN", - "ssid_modes": { - "wpa2_enterprise": [ - {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa3_enterprise": [ - {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa_enterprise": [ - {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, - - "rf": {}, - "radius": True -} -for sec_modes in setup_params_enterprise['ssid_modes'].keys(): - for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="VLAN Mode EAP Client ReConnect : Suite-A") -@pytest.mark.suiteA -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_enterprise], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeVLANModeEnterpriseTTLSSuiteA(object): - """ SuiteA Enterprise Test Cases - pytest -m "client_reconnect and nat and enterprise and ttls and interop and suiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6639", name="WIFI-6639") - @pytest.mark.wpa2_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6640", name="WIFI-6640") - @pytest.mark.twog - @pytest.mark.wpa2_enterprise - def test_ToggleWifiMode_2g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6641", name="WIFI-6641") - @pytest.mark.wpa3_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa2 enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, - connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6642", name="WIFI-6642") - @pytest.mark.twog - @pytest.mark.wpa3_enterprise - def test_ToggleWifiMode_2g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6637", name="WIFI-6637") - @pytest.mark.wpa_enterprise - @pytest.mark.fiveg - def test_ToggleWifiMode_5g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - """ wpa enterprise 5g - pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg" - """ - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6638", name="WIFI-6638") - @pytest.mark.twog - @pytest.mark.wpa_enterprise - def test_ToggleWifiMode_2g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data - , setup_perfectoMobile_iOS, radius_info, get_ap_logs): - - profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = ["BLANK"] - # ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - # print ("SSID_PASS: " + ssidPassword) - ttls_passwd = radius_info["password"] - identity = radius_info['user'] - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_eap_and_does_not_forget_ssid_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData) - - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py deleted file mode 100644 index 36ac3c511..000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py +++ /dev/null @@ -1,625 +0,0 @@ -from logging import exception -import io -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget - -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.vlan, pytest.mark.ToggleWifiMode] - -setup_params_general = { - "mode": "VLAN", - "ssid_modes": { - "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, - {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], - "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa2_personal": [ - {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}]}, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general['ssid_modes'].keys(): - for i in range(len(setup_params_general['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="Vlan Mode Client Reconnect : Suite-A") -@pytest.mark.InteropsuiteA -@allure.feature("VLAN MODE CLIENT RECONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleWifiModeSuiteOneVLAN(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and nat and InteropsuiteA" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6627", name="WIFI-6627") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, - setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6628", name="WIFI-6628") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ToggleWifiMode_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6625", name="WIFI-6625") - @pytest.mark.fiveg - @pytest.mark.wpa - def test_ToggleWifiMode_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6626", name="WIFI-6626") - @pytest.mark.twog - @pytest.mark.wpa - def test_ToggleWifiMode_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["wpa"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6631", name="WIFI-6631") - @pytest.mark.fiveg - @pytest.mark.open - def test_ToggleWifiMode_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6632", name="WIFI-6632") - @pytest.mark.twog - @pytest.mark.open - def test_ToggleWifiMode_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general["ssid_modes"]["open"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - - - - -setup_params_general_two = { - "mode": "VLAN", - "ssid_modes": { - "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}], - "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], - "security_key": "something", "vlan": 100}] - }, - "rf": {}, - "radius": False -} -for sec_modes in setup_params_general_two['ssid_modes'].keys(): - for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): - N = 2 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string - - -@allure.suite(suite_name="interop regression") -@allure.sub_suite(sub_suite_name="VLAN Mode Client Reconnect : Suite-B") -@pytest.mark.InteropsuiteB -@allure.feature("VLAN MODE CLIENT Reconnect") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general_two], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestToggleAirplaneModeSuiteVlanTwo(object): - """ Client Connectivity SuiteA - pytest -m "client_reconnect and bridge and InteropsuiteB" - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6629", name="WIFI-6629") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_5g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6630", name="WIFI-6630") - @pytest.mark.twog - @pytest.mark.wpa3_personal - def test_ToggleWifiMode_2g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6633", name="WIFI-6633") - @pytest.mark.fiveg - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_5g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6634", name="WIFI-6634") - @pytest.mark.twog - @pytest.mark.wpa3_personal_mixed - def test_ToggleWifiMode_2g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6635", name="WIFI-6635") - @pytest.mark.fiveg - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_5g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6636", name="WIFI-6636") - @pytest.mark.twog - @pytest.mark.wpa_wpa2_personal_mixed - def test_ToggleWifiMode_2g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS): - - profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - # ssidPassword = "[BLANK]" - print ("SSID_NAME: " + ssidName) - print ("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_APToMobileDevice_data - - # Set Wifi/AP Mode - ip, is_internet = gets_ip_add_and_does_not_forget_ssid_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - # - if is_internet: - if ip: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - - # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - Toggle_WifiMode_iOS(request, setup_perfectoMobile_iOS, connData) - ip_check, is_internet_check = gets_ip_add_for_checking_and_forgets_ssid_ios(request, ssidName, ssidPassword, - setup_perfectoMobile_iOS, connData) - if (ip_check == ip): - assert True - else: - assert False - else: - allure.attach(name="Connection Status: ", body=str("No Internet access")) - assert False \ No newline at end of file diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_enterprise_ttls.py new file mode 100644 index 000000000..b2713aa5a --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_enterprise_ttls.py @@ -0,0 +1,143 @@ +""" + Toggle Wifi Mode : VLAN Mode + pytest -m "toggle_wifi_mode and vlan and enterprise" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.vlan, pytest.mark.enterprise] + +setup_params_enterprise = { + "mode": "VLAN", + "ssid_modes": { + "wpa_enterprise": [ + {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa2_enterprise": [ + {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa3_enterprise": [ + {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]}, + + "rf": {}, + "radius": True +} + +for sec_modes in setup_params_enterprise['ssid_modes'].keys(): + for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("VLAN MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeVlanModeSuiteOne(object): + + @pytest.mark.fiveg + @pytest.mark.wpa2_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6524", name="WIFI-6524") + def test_ToggleWifiMode_WPA2_enterprise_5g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa2_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6525", name="WIFI-6525") + def test_ToggleWifiMode_WPA2_enterprise_2g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6522", name="WIFI-6522") + def test_ToggleWifiMode_WPA_enterprise_5g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6523", name="WIFI-6523") + def test_ToggleWifiMode_WPA_enterprise_2g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6526", name="WIFI-6526") + def test_ToggleWifiMode_wpa3_enterprise_5g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_enterprise + @allure.title("VLAN Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6527", name="WIFI-6527") + def test_ToggleWifiMode_wpa3_enterprise_2g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library, radius_info): + profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] + ssid_name = profile_data["ssid_name"] + identity = radius_info['user'] + ttls_passwd = radius_info["password"] + + passes, result = get_test_library.enterprise_toggle_wifi_mode_test(ssid=ssid_name, identity=identity, + ttls_passwd=ttls_passwd) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_general_security_modes.py new file mode 100644 index 000000000..82a9f8d32 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/toggle_wifi_mode_test/test_general_security_modes.py @@ -0,0 +1,252 @@ +""" + Toggle Wifi Mode : VLAN Mode + pytest -m "toggle_wifi_mode and vlan and general" + +""" +import random +import string +import time +import allure +import pytest + +pytestmark = [pytest.mark.toggle_wifi_mode, pytest.mark.vlan, pytest.mark.general] + +setup_params_general = { + "mode": "VLAN", + "ssid_modes": { + "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100}, + {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}], + "wpa2_personal": [ + {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]}, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general['ssid_modes'].keys(): + for i in range(len(setup_params_general['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@pytest.mark.InteropsuiteA +@allure.feature("VLAN MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeVlanModeSuiteOne(object): + + @pytest.mark.twog + @pytest.mark.wpa2_personal + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa2 encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6511", name="WIFI-6511") + def test_ToggleWifiMode_WPA2_Personal_2g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa2 encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6510", name="WIFI-6510") + def test_ToggleWifiMode_WPA2_Personal_5g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6513", name="WIFI-6513") + def test_ToggleWifiMode_WPA_2g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6512", name="WIFI-6512") + def test_ToggleWifiMode_WPA_5g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["wpa"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.open + @allure.title("VLAN Mode Toggle Wifi Button Test with open encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6515", name="WIFI-6515") + def test_ToggleWifiMode_open_2g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][0] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.open + @allure.title("VLAN Mode Toggle Wifi Button Test with open encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6514", name="WIFI-6514") + def test_ToggleWifiMode_open_5g_Vlan(self, get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general["ssid_modes"]["open"][1] + ssid_name = profile_data["ssid_name"] + security_key = "[BLANK]" + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + +setup_params_general_two = { + "mode": "VLAN", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], + "wpa3_personal_mixed": [ + {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"], + "security_key": "something", "vlan": 100}], + "wpa_wpa2_personal_mixed": [ + {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}] + }, + "rf": {}, + "radius": False +} + +for sec_modes in setup_params_general_two['ssid_modes'].keys(): + for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])): + N = 2 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string + +@pytest.mark.InteropsuiteB +@allure.feature("VLAN MODE TOGGLE WIFI MODE") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_general_two], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +class TestToggleWifiModeVlanModeSuiteTwo(object): + """ + Vlan Toggle Wifi-Mode (wpa3_personal. wpa3_personal_mixed. wpa_wpa2_personal_mixed) (twog, fiveg) + pytest -m "toggle_wifi_mode and vlan and SuiteTwo" + """ + @pytest.mark.twog + @pytest.mark.wpa3_personal + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa3_personal encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6517", name="WIFI-6517") + def test_ToggleWifiMode_WPA3_Personal_2g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa3_personal encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6516", name="WIFI-6516") + def test_ToggleWifiMode_WPA3_Personal_5g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa3_personal_mixed + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6519", name="WIFI-6519") + def test_ToggleWifiMode_WPA3_Personal_Mixed_2g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa3_personal_mixed + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa3_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6518", name="WIFI-6518") + def test_ToggleWifiMode_WPA3_Personal_Mixed_5g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.twog + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 2.4 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6521", name="WIFI-6521") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_2g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + + @pytest.mark.fiveg + @pytest.mark.wpa_wpa2_personal_mixed + @allure.title("VLAN Mode Toggle Wifi Button Test with wpa_wpa2_personal_mixed encryption 5 GHz Band") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6520", name="WIFI-6520") + def test_ToggleWifiMode_wpa_wpa2_personal_mixed_5g_Vlan(self,get_dut_logs_per_test_case, get_test_device_logs, + num_stations, setup_configuration, get_test_library): + profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] + ssid_name = profile_data["ssid_name"] + security_key = profile_data["security_key"] + + passes, result = get_test_library.toggle_wifi_mode_test(ssid=ssid_name, passkey=security_key) + allure.attach(name="Test result", body=str(result)) + assert passes == "PASS", result + diff --git a/tests/e2e/mesh/Mesh/test_mesh_bridge.py b/tests/e2e/mesh/Mesh/test_mesh_bridge.py index c0825e486..e18ce6d7b 100644 --- a/tests/e2e/mesh/Mesh/test_mesh_bridge.py +++ b/tests/e2e/mesh/Mesh/test_mesh_bridge.py @@ -19,28 +19,28 @@ setup_params_general = { @allure.feature("MESH BASIC") -@pytest.mark.parametrize( - 'setup_mesh_profile_fix', - [setup_params_general], - indirect=True, - scope="class" -) -# @pytest.mark.usefixtures("setup_profiles") +# @pytest.mark.parametrize( +# 'setup_mesh_profile_fix', +# [setup_params_general], +# indirect=True, +# scope="class" +# ) +# @pytest.mark.usefixtures("setup_configuration") class TestMesh(object): @pytest.mark.wpa2_personal - def testmesh_2g(self, setup_mesh_profile_fix, lf_test, lf_tools): + def testmesh_2g(self): raw_lines = [['selected_dut2: tip-node-2 ssid_wpa2_2g_1 90:3c:b3:9d:69:2f (2)'], ['selected_dut5: tip-node-2 ssid_wpa2_5g_1 90:3c:b3:9d:69:2e (1)'], ['sta_amount-2: 2'], ['radios-2-0: 1.4.6 wiphy0'], ['ap_arrangements: Current Position'], ['sta_position: Current Position'],['chamber-0: RootAP'],['chamber-1: Node1'], ['chamber-2: Node2'],['chamber-4: MobileStations'], ['path: Orbit Current'], ['traffic_types: TCP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: N2'], ["skip_dhcp: 1"], ["skip_5: 1"] ] - mesh_o = lf_test.mesh_test(instance_name="test_mesh1_1", raw_lines=raw_lines,duration="5m") - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Basic Mesh Test") + # mesh_o = lf_test.mesh_test(instance_name="test_mesh1_1", raw_lines=raw_lines,duration="5m") + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Basic Mesh Test") assert True diff --git a/tests/e2e/mesh/Mesh/test_node_patterns.py b/tests/e2e/mesh/Mesh/test_node_patterns.py index 52b50febf..0aa3d8d9c 100644 --- a/tests/e2e/mesh/Mesh/test_node_patterns.py +++ b/tests/e2e/mesh/Mesh/test_node_patterns.py @@ -19,19 +19,19 @@ setup_params_general = { @allure.feature("MESH BASIC") -@pytest.mark.parametrize( - 'setup_mesh_profile_fix', - [setup_params_general], - indirect=True, - scope="class" -) -# @pytest.mark.usefixtures("setup_profiles") +# @pytest.mark.parametrize( +# 'setup_mesh_profile_fix', +# [setup_params_general], +# indirect=True, +# scope="class" +# ) +# # @pytest.mark.usefixtures("setup_configuration") class TestNodePatters(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.ABC - def test_throughput_latency_2g_5g_ap_chamber_pos_ABC(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_ABC(self): #lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], ['sta_amount-4: 1'], ['radios-0-0: 1.2.6 wiphy0'], ['radios-0-3: 1.2.7 wiphy1'], ['radios-1-0: 1.3.6 wiphy0'], @@ -41,17 +41,17 @@ class TestNodePatters(object): ['chamber-2: Node2'], ['chamber-4: Mobile-Sta'], ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_ABC", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_ABC", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.A_BC - def test_throughput_latency_2g_5g_ap_chamber_pos_A_BC(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_A_BC(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -64,19 +64,19 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_A-BC", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_A-BC", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.A_B_C - def test_throughput_latency_2g_5g_ap_chamber_pos_A_B_C(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_A_B_C(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -89,19 +89,19 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_A-B-C", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_A-B-C", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.AB_C - def test_throughput_latency_2g_5g_ap_chamber_pos_AB_C(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_AB_C(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -114,19 +114,19 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_AB-C", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_AB-C", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.A__B_C - def test_throughput_latency_2g_5g_ap_chamber_pos_A__B_C(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_A__B_C(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -139,19 +139,19 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_A--B-C", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_A--B-C", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.A__B__C - def test_throughput_latency_2g_5g_ap_chamber_pos_A__B__C(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_A__B__C(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -164,19 +164,19 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_A--B--C", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_A--B--C", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3913", name="WIFI-3913") @pytest.mark.wpa2_personal @pytest.mark.BAC - def test_throughput_latency_2g_5g_ap_chamber_pos_BAC(self, setup_mesh_profile_fix, lf_test, lf_tools): + def test_throughput_latency_2g_5g_ap_chamber_pos_BAC(self): # lf_tools.reset_scenario() raw_lines = [['selected_dut2: tip-root ssid_wpa2_2g_1 34:ef:b6:af:4a:7d (2)'], ['selected_dut5: tip-root ssid_wpa2_5g_1 34:ef:b6:af:4a:7e (1)'], @@ -189,11 +189,11 @@ class TestNodePatters(object): ['path: Orbit Current'], ['traffic_types: UDP'], ['direction: Both'], ['tests: Throughput'], ['traf_combo: STA']] - mesh_o = lf_test.mesh_test(instance_name="node_patterns_BAC", raw_lines=raw_lines) - report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] - print("report name ", report_name) - entries = os.listdir("../reports/" + report_name + '/') - print("entries", entries) - lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") + # mesh_o = lf_test.mesh_test(instance_name="node_patterns_BAC", raw_lines=raw_lines) + # report_name = mesh_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + # print("report name ", report_name) + # entries = os.listdir("../reports/" + report_name + '/') + # print("entries", entries) + # lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Node patterns") assert True diff --git a/tests/e2e/mesh/conftest.py b/tests/e2e/mesh/conftest.py index 7538ec491..403683333 100644 --- a/tests/e2e/mesh/conftest.py +++ b/tests/e2e/mesh/conftest.py @@ -1,160 +1,160 @@ -import json -import os -import sys - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -if "libs" not in sys.path: - sys.path.append(f'../libs') - -from controller.controller_1x.controller import ProfileUtility -from controller.controller_2x.controller import UProfileUtility -import time -from lanforge.lf_tests import RunTest -from lanforge.lf_tools import ChamberView -import pytest -import allure - - -@pytest.fixture(scope="session") -def instantiate_profile(request): - if request.config.getoption("1.x"): - yield ProfileUtility - else: - yield UProfileUtility - - -@pytest.fixture(scope="session") -def lf_tools(get_configuration, testbed): - lf_tools_obj = ChamberView(lanforge_data=get_configuration['traffic_generator']['details'], - access_point_data=get_configuration['access_point'], - testbed=testbed) - yield lf_tools_obj - - -@pytest.fixture(scope="session") -def create_lanforge_chamberview(lf_tools): - scenario_object, scenario_name = lf_tools.Chamber_View() - return scenario_name - - -@pytest.fixture(scope="session") -def create_lanforge_chamberview_dut(lf_tools): - dut_object, dut_name = lf_tools.Create_Dut() - yield dut_name - -@pytest.fixture(scope="session") -def setup_mesh_scenario(lf_tools): - mesh_obj = lf_tools.create_mesh_scenario() - yield mesh_obj - -@pytest.fixture(scope="session") -def create_lanforge_chamberview_dut(lf_tools, skip_lf): - dut_name = "" - if not skip_lf: - dut_object, dut_name = lf_tools.Create_Dut() - return dut_name - -@pytest.fixture(scope="session") -def create_mesh_dut(lf_tools, skip_lf, ssid_data): - dut_name = "" - if not skip_lf: - mesh_dut_object, dut_name = lf_tools.create_mesh_dut(ssid_data=ssid_data) - yield dut_name - -@pytest.fixture(scope="class") -def setup_mesh_profile_fix(request, fixtures_ver, get_apnos, get_configuration, setup_controller, instantiate_profile,get_markers, get_equipment_ref, - lf_tools, ): - param = dict(request.param) - ret_var = fixtures_ver.setup_mesh_profile(request, param, get_apnos, get_configuration, setup_controller, instantiate_profile, get_markers, get_equipment_ref, - lf_tools, skip_lf=False, open_flow=None - ) - yield ret_var - - -@pytest.fixture(scope="class") -def setup_profiles(request, setup_controller, testbed, get_equipment_id, fixtures_ver, - instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info): - lf_tools.reset_scenario() - param = dict(request.param) - - # VLAN Setup - if request.param["mode"] == "VLAN": - - vlan_list = list() - refactored_vlan_list = list() - ssid_modes = request.param["ssid_modes"].keys() - for mode in ssid_modes: - for ssid in range(len(request.param["ssid_modes"][mode])): - if "vlan" in request.param["ssid_modes"][mode][ssid]: - vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) - else: - pass - if vlan_list: - [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] - vlan_list = refactored_vlan_list - for i in range(len(vlan_list)): - if vlan_list[i] > 4095 or vlan_list[i] < 1: - vlan_list.pop(i) - if request.param["mode"] == "VLAN": - lf_tools.add_vlan(vlan_ids=vlan_list) - - # call this, if 1.x - return_var = fixtures_ver.setup_profiles(request, param, setup_controller, testbed, get_equipment_id, - instantiate_profile, - get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, - radius_accounting_info) - - yield return_var - - -@pytest.fixture(scope="session") -def lf_test(get_configuration, setup_influx): - obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx) - yield obj - - -@pytest.fixture(scope="session") -def station_names_twog(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def station_names_fiveg(request, get_configuration): - station_names = [] - for i in range(0, int(request.config.getini("num_stations"))): - station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i)) - yield station_names - - -@pytest.fixture(scope="session") -def num_stations(request): - num_sta = int(request.config.getini("num_stations")) - yield num_sta - - -@pytest.fixture(scope="class") -def get_vif_state(get_apnos, get_configuration, request, lf_tools): - if request.config.getoption("1.x"): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - yield vif_state - else: - yield lf_tools.ssid_list - - -@pytest.fixture(scope="class") -def get_vlan_list(get_apnos, get_configuration): - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") - vlan_list = list(ap_ssh.get_vlan()) - vlan_list.sort() - yield vlan_list +# import json +# import os +# import sys +# +# sys.path.append( +# os.path.dirname( +# os.path.realpath(__file__) +# ) +# ) +# if "libs" not in sys.path: +# sys.path.append(f'../libs') +# +# from controller.controller_1x.controller import ProfileUtility +# from controller.controller_2x.controller import UProfileUtility +# import time +# from lanforge.lf_tests import RunTest +# from lanforge.lf_tools import ChamberView +# import pytest +# import allure +# +# +# @pytest.fixture(scope="session") +# def instantiate_profile(request): +# if request.config.getoption("1.x"): +# yield ProfileUtility +# else: +# yield UProfileUtility +# +# +# @pytest.fixture(scope="session") +# def lf_tools(get_configuration, testbed): +# lf_tools_obj = ChamberView(lanforge_data=get_configuration['traffic_generator']['details'], +# access_point_data=get_configuration['access_point'], +# testbed=testbed) +# yield lf_tools_obj +# +# +# @pytest.fixture(scope="session") +# def create_lanforge_chamberview(lf_tools): +# scenario_object, scenario_name = lf_tools.Chamber_View() +# return scenario_name +# +# +# @pytest.fixture(scope="session") +# def create_lanforge_chamberview_dut(lf_tools): +# dut_object, dut_name = lf_tools.Create_Dut() +# yield dut_name +# +# @pytest.fixture(scope="session") +# def setup_mesh_scenario(lf_tools): +# mesh_obj = lf_tools.create_mesh_scenario() +# yield mesh_obj +# +# @pytest.fixture(scope="session") +# def create_lanforge_chamberview_dut(lf_tools, skip_lf): +# dut_name = "" +# if not skip_lf: +# dut_object, dut_name = lf_tools.Create_Dut() +# return dut_name +# +# @pytest.fixture(scope="session") +# def create_mesh_dut(lf_tools, skip_lf, ssid_data): +# dut_name = "" +# if not skip_lf: +# mesh_dut_object, dut_name = lf_tools.create_mesh_dut(ssid_data=ssid_data) +# yield dut_name +# +# @pytest.fixture(scope="class") +# def setup_mesh_profile_fix(request, fixtures_ver, get_apnos, get_configuration, setup_controller, instantiate_profile,get_markers, get_equipment_ref, +# lf_tools, ): +# param = dict(request.param) +# ret_var = fixtures_ver.setup_mesh_profile(request, param, get_apnos, get_configuration, setup_controller, instantiate_profile, get_markers, get_equipment_ref, +# lf_tools, skip_lf=False, open_flow=None +# ) +# yield ret_var +# +# +# @pytest.fixture(scope="class") +# def setup_configuration(request, setup_controller, testbed, get_equipment_id, fixtures_ver, +# instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, +# get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info): +# lf_tools.reset_scenario() +# param = dict(request.param) +# +# # VLAN Setup +# if request.param["mode"] == "VLAN": +# +# vlan_list = list() +# refactored_vlan_list = list() +# ssid_modes = request.param["ssid_modes"].keys() +# for mode in ssid_modes: +# for ssid in range(len(request.param["ssid_modes"][mode])): +# if "vlan" in request.param["ssid_modes"][mode][ssid]: +# vlan_list.append(request.param["ssid_modes"][mode][ssid]["vlan"]) +# else: +# pass +# if vlan_list: +# [refactored_vlan_list.append(x) for x in vlan_list if x not in refactored_vlan_list] +# vlan_list = refactored_vlan_list +# for i in range(len(vlan_list)): +# if vlan_list[i] > 4095 or vlan_list[i] < 1: +# vlan_list.pop(i) +# if request.param["mode"] == "VLAN": +# lf_tools.add_vlan(vlan_ids=vlan_list) +# +# # call this, if 1.x +# return_var = fixtures_ver.setup_configuration(request, param, setup_controller, testbed, get_equipment_id, +# instantiate_profile, +# get_markers, create_lanforge_chamberview_dut, lf_tools, +# get_security_flags, get_configuration, radius_info, get_apnos, +# radius_accounting_info) +# +# yield return_var +# +# +# @pytest.fixture(scope="session") +# def lf_test(get_configuration, setup_influx): +# obj = RunTest(configuration_data=get_configuration, influx_params=setup_influx) +# yield obj +# +# +# @pytest.fixture(scope="session") +# def station_names_twog(request, get_configuration): +# station_names = [] +# for i in range(0, int(request.config.getini("num_stations"))): +# station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i)) +# yield station_names +# +# +# @pytest.fixture(scope="session") +# def station_names_fiveg(request, get_configuration): +# station_names = [] +# for i in range(0, int(request.config.getini("num_stations"))): +# station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i)) +# yield station_names +# +# +# @pytest.fixture(scope="session") +# def num_stations(request): +# num_sta = int(request.config.getini("num_stations")) +# yield num_sta +# +# +# @pytest.fixture(scope="class") +# def get_vif_state(get_apnos, get_configuration, request, lf_tools): +# if request.config.getoption("1.x"): +# ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") +# vif_state = list(ap_ssh.get_vif_state_ssids()) +# vif_state.sort() +# yield vif_state +# else: +# yield lf_tools.ssid_list +# +# +# @pytest.fixture(scope="class") +# def get_vlan_list(get_apnos, get_configuration): +# ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/") +# vlan_list = list(ap_ssh.get_vlan()) +# vlan_list.sort() +# yield vlan_list diff --git a/tests/fixtures_1x.py b/tests/fixtures_1x.py deleted file mode 100644 index 8fe12c006..000000000 --- a/tests/fixtures_1x.py +++ /dev/null @@ -1,663 +0,0 @@ -import sys -import os -if "libs" not in sys.path: - sys.path.append(f'../libs') -for folder in 'py-json', 'py-scripts': - if folder not in sys.path: - sys.path.append(f'../lanforge/lanforge-scripts/{folder}') - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") - -sys.path.append(f'../libs') -sys.path.append(f'../libs/lanforge/') - -from LANforge.LFUtils import * - -if 'py-json' not in sys.path: - sys.path.append('../py-scripts') -from apnos.apnos import APNOS -from controller.controller_1x.controller import Controller -from controller.controller_1x.controller import FirmwareUtility -import pytest -from cv_test_manager import cv_test -from configuration import CONFIGURATION -from configuration import RADIUS_SERVER_DATA -from configuration import RADIUS_ACCOUNTING_DATA -from testrails.testrail_api import APIClient -from testrails.reporting import Reporting -from lf_tools import ChamberView -from sta_connect2 import StaConnect2 -from os import path -from typing import Any, Callable, Optional - -import time -import allure -import pytest - -class Fixtures_1x: - - def __init__(self, configuration={}): - self.lab_info = configuration - print(self.lab_info) - print("1.X") - try: - self.controller_obj = Controller(controller_data=self.lab_info["controller"]) - except Exception as e: - print(e) - allure.attach(body=str(e), name="Controller Instantiation Failed: ") - sdk_client = False - pytest.exit("unable to communicate to Controller" + str(e)) - - def disconnect(self): - self.controller_obj.disconnect_Controller() - - def setup_firmware(self): - pass - - def get_sdk_version(self): - version = self.controller_obj.get_sdk_version() - return version - - def get_ap_cloud_connectivity_status(self, get_configuration, get_apnos): - mgr_status = [] - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info, sdk="1.x") - status = ap_ssh.get_manager_state() - if "ACTIVE" not in status: - time.sleep(30) - ap_ssh = APNOS(access_point_info) - status = ap_ssh.get_manager_state() - mgr_status.append(status) - return mgr_status - - def get_ap_version(self, get_apnos, get_configuration): -# version_list = [] -# for access_point_info in get_configuration['access_point']: -# ap_ssh = get_apnos(access_point_info) -# version = ap_ssh.get_ap_version_ucentral() -# version_list.append(version) - return ["-\n-"] - - def setup_profiles(self, request, param, setup_controller, testbed, get_equipment_ref, instantiate_profile, - get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info, skip_lf=False): - - instantiate_profile = instantiate_profile(sdk_client=setup_controller) - vlan_id, mode = 0, 0 - instantiate_profile.cleanup_objects() - parameter = dict(param) - print(parameter) - test_cases = {} - profile_data = {} - if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter['mode']) - allure.attach(body=parameter['mode'], name="Invalid Mode: ") - return test_cases - - if parameter['mode'] == "NAT": - mode = "NAT" - vlan_id = 1 - if parameter['mode'] == "BRIDGE": - mode = "BRIDGE" - vlan_id = 1 - if parameter['mode'] == "VLAN": - mode = "BRIDGE" - - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Equipment-AP-" + parameter['mode']) - - profile_data["equipment_ap"] = {"profile_name": testbed + "-Equipment-AP-" + parameter['mode']} - profile_data["ssid"] = {} - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - profile_name = testbed + "-SSID-" + i + "-" + str(j) + "-" + parameter['mode'] - data = parameter["ssid_modes"][i][j] - data["profile_name"] = profile_name - if "mode" not in dict(data).keys(): - data["mode"] = mode - if "vlan" not in dict(data).keys(): - data["vlan"] = vlan_id - instantiate_profile.delete_profile_by_name(profile_name=profile_name) - profile_data["ssid"][i].append(data) - # print(profile_name) - # print(profile_data) - - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode) - time.sleep(10) - """ - Setting up rf profile - """ - rf_profile_data = { - "name": "RF-Profile-" + testbed + "-" + parameter['mode'] + "-" + - get_configuration['access_point'][0]['mode'] - } - - for i in parameter["rf"]: - rf_profile_data[i] = parameter['rf'][i] - # print(rf_profile_data) - - try: - instantiate_profile.delete_profile_by_name(profile_name=rf_profile_data['name']) - instantiate_profile.set_rf_profile(profile_data=rf_profile_data, - mode=get_configuration['access_point'][0]['mode']) - allure.attach(body=str(rf_profile_data), - name="RF Profile Created : " + get_configuration['access_point'][0]['mode']) - except Exception as e: - print(e) - allure.attach(body=str(e), name="Exception ") - - # Radius Profile Creation - if parameter["radius"]: - radius_info = radius_info - radius_info["name"] = testbed + "-Automation-Radius-Profile-" + mode - instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode) - try: - instantiate_profile.create_radius_profile(radius_info=radius_info) - allure.attach(body=str(radius_info), - name="Radius Profile Created") - test_cases['radius_profile'] = True - except Exception as e: - print(e) - test_cases['radius_profile'] = False - - # SSID Profile Creation - lf_dut_data = [] - for mode in profile_data['ssid']: - if mode == "open": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["open_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["open_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["open_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["open_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa2_personal": - for j in profile_data["ssid"][mode]: - # print(j) - - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa2_personal_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa2_personal_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa2_personal_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa2_personal_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa_wpa2_personal_mixed": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - - creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile( - profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_wpa2_personal_mixed_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_wpa2_personal_mixed_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_wpa2_personal_mixed_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_wpa2_personal_mixed_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa3_personal": - for j in profile_data["ssid"][mode]: - print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - - creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_personal_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_personal_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_personal_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_personal_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - if mode == "wpa3_personal_mixed": - for j in profile_data["ssid"][mode]: - print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile( - profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_personal_mixed_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_personal_mixed_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_personal_mixed_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_personal_mixed_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa_enterprise": - for j in profile_data["ssid"][mode]: - - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_enterprise_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_enterprise_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_enterprise_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_enterprise_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - if mode == "wpa2_enterprise": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j) - - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa2_enterprise_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa2_enterprise_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa2_enterprise_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa2_enterprise_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - if mode == "wpa3_enterprise": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_enterprise_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_enterprise_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_enterprise_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_enterprise_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wpa_wpa2_enterprise_mixed": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile( - profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_wpa2_enterprise_mixed_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_wpa2_enterprise_mixed_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa_wpa2_enterprise_mixed_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa_wpa2_enterprise_mixed_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - if mode == "wpa3_enterprise_mixed": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile( - profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_enterprise_mixed_2g"] = True - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_enterprise_mixed_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wpa3_enterprise_mixed_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wpa3_enterprise_mixed_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - - if mode == "wep": - for j in profile_data["ssid"][mode]: - # print(j) - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - for i in range(len(j["appliedRadios"])): - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz") - j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz") - creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wep_2g"] = True - if j["appliedRadios"].__contains__("is5GHzU"): - test_cases["wep_5g"] = True - allure.attach(body=str(creates_profile), - name="SSID Profile Created") - except Exception as e: - print(e) - if j["appliedRadios"].__contains__("is2dot4GHz"): - test_cases["wep_2g"] = False - if j["appliedRadios"].__contains__("is5GHz"): - test_cases["wep_5g"] = False - allure.attach(body=str(e), - name="SSID Profile Creation Failed") - # Equipment AP Profile Creation - try: - instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap']) - test_cases["equipment_ap"] = True - allure.attach(body=str(profile_data['equipment_ap']), - name="Equipment AP Profile Created") - except Exception as e: - print(e) - test_cases["equipment_ap"] = False - allure.attach(body=str(e), - name="Equipment AP Profile Creation Failed") - - # Push the Equipment AP Profile to AP - try: - for i in get_equipment_ref: - instantiate_profile.push_profile_old_method(equipment_id=i) - except Exception as e: - print(e) - print("failed to create AP Profile") - - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") - # ssid_names = [] - # for i in instantiate_profile.profile_creation_ids["ssid"]: - # ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i)) - # ssid_names.sort() - ssid_names = [] - for i in lf_dut_data: - ssid_names.append(i["ssid_name"]) - ssid_names.sort() - # This loop will check the VIF Config with cloud profile - vif_config = [] - test_cases['vifc'] = False - for i in range(0, 18): - vif_config = list(ap_ssh.get_vif_config_ssids()) - vif_config.sort() - print(vif_config) - print(ssid_names) - if ssid_names == vif_config: - test_cases['vifc'] = True - break - time.sleep(10) - allure.attach( - body=str("VIF Config: " + str(vif_config) + "\n" + "SSID Pushed from Controller: " + str(ssid_names)), - name="SSID Profiles in VIF Config and Controller: ") - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x") - - # This loop will check the VIF Config with VIF State - test_cases['vifs'] = False - for i in range(0, 18): - vif_state = list(ap_ssh.get_vif_state_ssids()) - vif_state.sort() - vif_config = list(ap_ssh.get_vif_config_ssids()) - vif_config.sort() - print(vif_config) - print(vif_state) - if vif_state == vif_config: - test_cases['vifs'] = True - break - time.sleep(10) - allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "VIF State: " + str(vif_state)), - name="SSID Profiles in VIF Config and VIF State: ") - - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="AP LOgs: ") - # ssid_info = ap_ssh.get_ssid_info() - # ssid_data = [] - # print(ssid_info) - # band_mapping = ap_ssh.get_bssid_band_mapping() - # print(band_mapping) - # idx_mapping = {} - # for i in range(0, len(ssid_info)): - # if ssid_info[i][1] == "OPEN": - # ssid_info[i].append("") - # if ssid_info[i][1] == "OPEN": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # - # if ssid_info[i][1] == "WPA": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # if ssid_info[i][1] == "WPA2": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # if ssid_info[i][1] == "WPA3_PERSONAL": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # - # if ssid_info[i][1] == "WPA | WPA2": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # - # if ssid_info[i][1] == "EAP-TTLS": - # ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" + - # " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]] - # idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]], - # ssid_info[i][0]] - # ssid_data.append(ssid) - # lf_tools.dut_idx_mapping = idx_mapping - # # Add bssid password and security from iwinfo data - # # Format SSID Data in the below format - # # ssid_data = [ - # # ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'], - # # ['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59'] - # # ] - # allure.attach(name="SSID DATA IN LF DUT", body=str(ssid_data)) - # lf_tools.update_ssid(ssid_data=ssid_data) - - def teardown_session(): - print("\nRemoving Profiles") - instantiate_profile.delete_profile_by_name(profile_name=profile_data['equipment_ap']['profile_name']) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["ssid"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["radius"]) - instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["rf"]) - allure.attach(body=str(profile_data['equipment_ap']['profile_name'] + "\n"), - name="Tear Down in Profiles ") - time.sleep(20) - - request.addfinalizer(teardown_session) - return test_cases diff --git a/tests/fixtures_2x.py b/tests/fixtures_2x.py deleted file mode 100644 index 50a1d084c..000000000 --- a/tests/fixtures_2x.py +++ /dev/null @@ -1,1186 +0,0 @@ -""" Python Inbuilt Libraries """ -import random -import string - -import allure -import pytest -import sys -import os -import json -import time - -import requests - -""" Environment Paths """ -if "libs" not in sys.path: - sys.path.append(f'../libs') -for folder in 'py-json', 'py-scripts': - if folder not in sys.path: - sys.path.append(f'../lanforge/lanforge-scripts/{folder}') - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") - -sys.path.append(f'../libs') -sys.path.append(f'../libs/lanforge/') - -from LANforge.LFUtils import * - -if 'py-json' not in sys.path: - sys.path.append('../py-scripts') -from apnos.apnos import APNOS -from controller.controller_2x.controller import Controller -from controller.controller_2x.controller import FMSUtils -from controller.controller_2x.controller import ProvUtils -from configuration import CONFIGURATION -from configuration import RADIUS_SERVER_DATA -from configuration import RADIUS_ACCOUNTING_DATA -from lanforge.scp_util import SCP_File - - -class Fixtures_2x: - - def __init__(self, configuration={}, run_lf=False): - self.lab_info = configuration - print(self.lab_info) - print("2.X") - self.run_lf = run_lf - self.controller_obj="" - if not run_lf: - try: - self.controller_obj = Controller(controller_data=self.lab_info["controller"]) - self.prov_controller_obj = ProvUtils(sdk_client=self.controller_obj) - self.fw_client = FMSUtils(sdk_client=self.controller_obj) - except Exception as e: - print(e) - allure.attach(body=str(e), name="Controller Instantiation Failed: ") - sdk_client = False - pytest.exit("unable to communicate to Controller" + str(e)) - - def disconnect(self): - if not self.run_lf: - self.controller_obj.logout() - - def setup_firmware(self, get_apnos, get_configuration, request=""): - # Query AP Firmware - upgrade_status = [] - for ap in get_configuration['access_point']: - - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - # If specified as URL - try: - response = requests.get(ap['version']) - print("URL is valid and exists on the internet") - allure.attach(name="firmware url: ", body=str(ap['version'])) - target_revision_commit = ap['version'].split("-")[-2] - ap_version = ap_ssh.get_ap_version_ucentral() - current_version_commit = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - - # if AP is already in target Version then skip upgrade unless force upgrade is specified - if target_revision_commit in current_version_commit: - continue - self.fw_client.upgrade_firmware(serial=ap['serial'], url=str(ap['version'])) - - items = list(range(0, 300)) - l = len(items) - ap_version = ap_ssh.get_ap_version_ucentral() - current_version_commit = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - if target_revision_commit in current_version_commit: - upgrade_status.append([ap['serial'], target_revision_commit, current_version_commit]) - print("Firmware Upgraded to :", ap_version) - else: - print("firmware upgraded failed: ", target_revision) - upgrade_status.append([ap['serial'], target_revision_commit, current_version_commit]) - break - except Exception as e: - print("URL does not exist on Internet") - # else Specified as "branch-commit_id" / "branch-latest" - firmware_url = "" - ap_version = ap_ssh.get_ap_version_ucentral() - response = self.fw_client.get_latest_fw(model=ap["model"]) - # if the target version specified is "branch-latest" - if ap['version'].split('-')[1] == "latest": - # get the latest branch - firmware_list = self.fw_client.get_firmwares(model=ap['model'], branch="", commit_id='') - firmware_list.reverse() - - for firmware in firmware_list: - if firmware['image'] == "": - continue - if str(firmware['image']).__contains__("upgrade.bin"): - temp = firmware['image'].split("-") - temp.pop(-1) - temp = "-".join(temp) - firmware['image'] = temp - if ap['version'].split('-')[0] == 'release': - if firmware['revision'].split("/")[1].replace(" ", "").split('-')[1].__contains__('v2.'): - print("Target Firmware: \n", firmware) - allure.attach(name="Target firmware : ", body=str(firmware)) - target_revision = firmware['revision'].split("/")[1].replace(" ", "") - - # check the current AP Revision before upgrade - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - - # print and report the firmware versions before upgrade - allure.attach(name="Before Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - - # if AP is already in target Version then skip upgrade unless force upgrade is specified - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version, 'skip']) - print("Skipping Upgrade! AP is already in target version") - allure.attach(name="Skipping Upgrade because AP is already in the target Version", - body="") - break - - self.fw_client.upgrade_firmware(serial=ap['serial'], url=str(firmware['uri'])) - # wait for 300 seconds after firmware upgrade - print("waiting for 300 Sec for Firmware Upgrade") - time.sleep(300) - - # check the current AP Revision again - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - # print and report the Firmware versions after upgrade - allure.attach(name="After Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded successfully: ", target_revision) - else: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded failed: ", target_revision) - break - print("shivam", firmware['image'].split("-"), ap['version'].split('-')[0]) - if firmware['image'].split("-")[-2] == ap['version'].split('-')[0]: - print("Target Firmware: \n", firmware) - allure.attach(name="Target firmware : ", body=str(firmware)) - - target_revision = firmware['revision'].split("/")[1].replace(" ", "") - - # check the current AP Revision before upgrade - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - - # print and report the firmware versions before upgrade - allure.attach(name="Before Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - - # if AP is already in target Version then skip upgrade unless force upgrade is specified - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version, 'skip']) - print("Skipping Upgrade! AP is already in target version") - allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") - break - - self.fw_client.upgrade_firmware(serial=ap['serial'], url=str(firmware['uri'])) - # wait for 300 seconds after firmware upgrade - print("waiting for 300 Sec for Firmware Upgrade") - time.sleep(500) - - # check the current AP Revision again - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - # print and report the Firmware versions after upgrade - allure.attach(name="After Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded successfully: ", target_revision) - else: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded failed: ", target_revision) - break - # if branch-commit is specified - else: - firmware_list = self.fw_client.get_firmwares(model=ap['model'], branch="", commit_id='') - fw_list = [] - # getting the list of firmwares in fw_list that has the commit id specified as an input - for firmware in firmware_list: - if firmware['revision'].split("/")[1].replace(" ", "").split('-')[-1] == ap['version'].split('-')[ - 1]: - fw_list.append(firmware) - - # If there is only 1 commit ID in fw_list - if len(fw_list) == 1: - - print("Target Firmware: \n", fw_list[0]) - allure.attach(name="Target firmware : ", body=str(fw_list[0])) - - url = fw_list[0]['uri'] - target_revision = fw_list[0]['revision'].split("/")[1].replace(" ", "") - - # check the current AP Revision before upgrade - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - - # print and report the firmware versions before upgrade - allure.attach(name="Before Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - - # if AP is already in target Version then skip upgrade unless force upgrade is specified - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version, 'skip']) - print("Skipping Upgrade! AP is already in target version") - allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") - break - - # upgrade the firmware in another condition - else: - self.fw_client.upgrade_firmware(serial=ap['serial'], url=str(url)) - - # wait for 300 seconds after firmware upgrade - print("waiting for 300 Sec for Firmware Upgrade") - time.sleep(300) - - # check the current AP Revision again - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - # print and report the Firmware versions after upgrade - allure.attach(name="After Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded successfully: ", target_revision) - else: - upgrade_status.append([ap['serial'], target_revision, current_version]) - print("firmware upgraded failed: ", target_revision) - break - - # if there are 1+ firmware images in fw_list then check for branch - else: - target_fw = "" - for firmware in fw_list: - if ap['version'].split('-')[0] == 'release': - if firmware['revision'].split("/")[1].replace(" ", "").split('-')[1].__contains__('v2.'): - target_fw = firmware - break - if firmware['image'].split("-")[-2] == ap['version'].split('-')[0]: - target_fw = firmware - break - firmware = target_fw - print("Target Firmware: \n", firmware) - allure.attach(name="Target firmware : ", body=str(firmware)) - - target_revision = firmware['revision'].split("/")[1].replace(" ", "") - - # check the current AP Revision before upgrade - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - - # print and report the firmware versions before upgrade - allure.attach(name="Before Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - - # if AP is already in target Version then skip upgrade unless force upgrade is specified - if current_version == target_revision: - upgrade_status.append([ap['serial'], target_revision, current_version, 'skip']) - print("Skipping Upgrade! AP is already in target version") - allure.attach(name="Skipping Upgrade because AP is already in the target Version", body="") - break - - self.fw_client.upgrade_firmware(serial=ap['serial'], url=str(firmware['uri'])) - # wait for 300 seconds after firmware upgrade - - print("waiting for 300 Sec for Firmware Upgrade") - time.sleep(300) - - # check the current AP Revision again - ap_version = ap_ssh.get_ap_version_ucentral() - current_version = str(ap_version).split("/")[1].replace(" ", "").splitlines()[0] - # print and report the Firmware versions after upgrade - allure.attach(name="After Firmware Upgrade Request: ", - body="current revision: " + current_version + "\ntarget revision: " + target_revision) - print("current revision: ", current_version, "\ntarget revision: ", target_revision) - if current_version == target_revision: - upgrade_status.append([target_revision, current_version]) - print("firmware upgraded successfully: ", target_revision) - else: - upgrade_status.append([target_revision, current_version]) - print("firmware upgraded failed: ", target_revision) - break - return upgrade_status - - def get_ap_cloud_connectivity_status(self, get_configuration, get_apnos): - status_data = [] - self.ubus_connection = [] - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info, sdk="2.x") - status = ap_ssh.get_ucentral_status() - print(status) - status_data.append(status) - connectivity_data = ap_ssh.run_generic_command(cmd="ubus call ucentral status") - self.ubus_connection.append(['Serial Number: ' + access_point_info['serial'], connectivity_data]) - return status_data - - def get_ap_version(self, get_apnos, get_configuration): - - version_list = [] - if not self.run_lf: - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info) - version = ap_ssh.get_ap_version_ucentral() - version_list.append(version) - return version_list - - def get_uci_show(self, get_apnos, get_configuration): - version_list = [] - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info) - connectivity_data = ap_ssh.run_generic_command(cmd="uci show ucentral.config.server") - # connectivity_data.pop(0) - # connectivity_data.pop(1) - break - # version_list.append(connectivity_data) - return connectivity_data[1] - - def dfs(self, get_apnos, get_configuration): - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info, sdk="2.x") - return ap_ssh - - def get_ap_status_logs(self, get_configuration, get_apnos): - connected = 0 - redirector_data = None - for access_point_info in get_configuration['access_point']: - ap_ssh = get_apnos(access_point_info, sdk="2.x") - # for i in range(15): - connectivity_data = ap_ssh.run_generic_command(cmd="ubus call ucentral status") - if "disconnected" in str(connectivity_data): - print("AP in disconnected state, sleeping for 30 sec") - # time.sleep(30) - connected = 0 - # # if i == 10: - # print("rebooting AP") - # ap_ssh.reboot() - # print("sleep for 300 sec") - # time.sleep(300) - else: - connected = 1 - - redirector_data = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/redirector.json") - return connected, redirector_data - - def get_sdk_version(self): - version = self.controller_obj.get_sdk_version() - return version - - def setup_profiles(self, request, param, setup_controller, testbed, get_equipment_ref, - instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools, - get_security_flags, get_configuration, radius_info, get_apnos, - radius_accounting_info, skip_lf=False, run_lf=False, open_flow=None): - if run_lf: - return 0 - instantiate_profile_obj = instantiate_profile(sdk_client=setup_controller) - print(1, instantiate_profile_obj.sdk_client) - vlan_id, mode = 0, 0 - parameter = dict(param) - print("parameter", parameter) - test_cases = {} - profile_data = {} - var = "" - if len(parameter['rf']) > 0: - instantiate_profile_obj.set_radio_config(radio_config=parameter['rf']) - else: - instantiate_profile_obj.set_radio_config() - if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter['mode']) - return test_cases - - - - if parameter['mode'] == "NAT": - mode = "NAT" - instantiate_profile_obj.set_mode(mode=mode) - vlan_id = 1 - if parameter['mode'] == "BRIDGE": - mode = "BRIDGE" - instantiate_profile_obj.set_mode(mode=mode) - vlan_id = 1 - if parameter['mode'] == "VLAN": - mode = "VLAN" - instantiate_profile_obj.set_mode(mode=mode) - profile_data["ssid"] = {} - - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - data = parameter["ssid_modes"][i][j] - profile_data["ssid"][i].append(data) - lf_dut_data = [] - - for mode in profile_data['ssid']: - if mode == "open": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'none' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa_2g"] = False - if mode == "wpa": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'psk' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa_2g"] = False - if mode == "wpa2_personal": - for j in profile_data["ssid"][mode]: - - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'psk2' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - if mode == "wpa_wpa2_personal_mixed": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'psk-mixed' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - if mode == "wpa3_personal": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'sae' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - if mode == "wpa3_personal_mixed": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'sae-mixed' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - # EAP SSID Modes - if mode == "wpa2_enterprise": - for j in profile_data["ssid"][mode]: - if "radius_auth_data" in j: - var = True - else: - var = False - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'wpa2' - - if var : - RADIUS_SERVER_DATA = j["radius_auth_data"] - RADIUS_ACCOUNTING_DATA = j['radius_acc_data'] - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_2g"] = True - else: - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - if mode == "wpa3_enterprise": - for j in profile_data["ssid"][mode]: - if "radius_auth_data" in j: - var = True - else: - var = False - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'wpa3' - if var : - RADIUS_SERVER_DATA = j["radius_auth_data"] - RADIUS_ACCOUNTING_DATA = j['radius_acc_data'] - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_2g"] = True - else: - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa3_eap"] = True - except Exception as e: - print(e) - test_cases["wpa3_eap"] = False - if mode == "wpa_enterprise": # -------WPA Enterprise---------------- - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'wpa' - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_eap"] = True - except Exception as e: - print(e) - test_cases["wpa_eap"] = False - if mode == "wpa_wpa2_enterprise_mixed": # -------WPA WPA2 Enterprise Mixed---------------- - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = "wpa-mixed" - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_eap"] = True - except Exception as e: - print(e) - test_cases["wpa_eap"] = False - if mode == "wpa3_enterprise_mixed": # -------WPA3 Enterprise Mixed---------------- - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = "wpa3-mixed" - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_eap"] = True - except Exception as e: - print(e) - test_cases["wpa_eap"] = False - if mode == "wpa3_192_enterprise": # -------WPA3 192 Enterprise Mixed---------------- - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = "wpa3-192" - RADIUS_SERVER_DATA = radius_info - RADIUS_ACCOUNTING_DATA = radius_accounting_info - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, - radius_auth_data=RADIUS_SERVER_DATA, - radius_accounting_data=RADIUS_ACCOUNTING_DATA) - test_cases["wpa_eap"] = True - except Exception as e: - print(e) - test_cases["wpa_eap"] = False - try: - if parameter['express-wifi']: - instantiate_profile_obj.set_express_wifi(open_flow=open_flow) - except Exception as e: - pass - - try: - if parameter['captive_portal']: - instantiate_profile_obj.set_captive_portal() - # print(json.loads(str(instantiate_profile_obj.base_profile_config).replace(" ", "").replace("'", '"'))) - except: - pass - - ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="2.x") - - # Get ucentral status - connected, latest, active = ap_ssh.get_ucentral_status() - - output = ap_ssh.run_generic_command(cmd="ubus call ucentral status") - allure.attach(name="ubus call ucentral status: ", body=str(output)) - # pytest.exit("AP is disconnected from UC Gateway") - - connected, latest, active = ap_ssh.get_ucentral_status() - latest_old = latest - - if latest != active: - active_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.active") - allure.attach(name="Active Config: ", body=str(active_cfg)) - active_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest)) - allure.attach(name="Latest Config: ", body=str(active_cfg)) - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="FAILURE: AP Logs: ") - pytest.fail("AP latest and active are different") - - S = 10 - - # Add logger command before config push - instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) - ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name) - - - - # Adding memory Profile code before applying config - output = ap_ssh.get_memory_profile() - allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) - - time_1 = time.time() - push_config_exception_variable = False - # Apply config - try: - ap_logs = ap_ssh.get_logread() - allure.attach(body=ap_logs, name="AP Log Before config push: ") - instantiate_profile_obj.push_config(serial_number=get_equipment_ref[0]) - - #print(instantiate_profile_obj.base_profile_config) - except Exception as e: - push_config_exception_variable = True - ap_logs = ap_ssh.get_logread() - allure.attach(body=ap_logs, name="Failure while pushing- AP Logs: ") - allure.attach(body=str(e), name="Exception data after config push: ") - print(e) - - config = json.loads(str(instantiate_profile_obj.base_profile_config).replace(" ", "").replace("'", '"').replace("True", "true").replace("False", "false")) - config["uuid"] = 0 - - # Attach the config that is sent from API - allure.attach(name="Config Sent from API: ", body=str(config), attachment_type=allure.attachment_type.JSON) - - ap_config_latest = ap_ssh.get_uc_latest_config() - try: - ap_config_latest["uuid"] = 0 - except Exception as e: - print(e) - pass - x = 1 - - # Check if ucentral gw has pushed the config into latest - connected, latest, active = ap_ssh.get_ucentral_status() - while latest_old == latest: - time.sleep(5) - x += 1 - print("old config: ", latest_old) - print("latest: ", latest) - connected, latest, active = ap_ssh.get_ucentral_status() - if x == 5: - break - onnected, latest, active = ap_ssh.get_ucentral_status() - if latest == latest_old: - latest_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest)) - allure.attach(name="Latest Config Received by AP: ", - body=str(latest_cfg), - attachment_type=allure.attachment_type.JSON) - 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: ") - print("Config from ucentral gw is not sent to AP") - else: - print("Config is sent to AP from ucentral gw") - - x = 1 - latest_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest)) - allure.attach(name="Latest Config Received by AP: ", - body=str(latest_cfg), - attachment_type=allure.attachment_type.JSON) - - while active != latest: - connected, latest, active = ap_ssh.get_ucentral_status() - time.sleep(20) - x += 1 - print("active: ", active) - print("latest: ", latest) - if x == 10: - break - - connected, latest, active = ap_ssh.get_ucentral_status() - if latest == active: - print("Config properly Applied on AP") - else: - print("Config is not Applied on AP") - - time_2 = time.time() - time_interval = time_2 - time_1 - allure.attach(name="Time Took to apply Config: " + str(time_interval), body="") - - time.sleep(60) - - ap_config_latest = ap_ssh.get_uc_latest_config() - ap_config_active = ap_ssh.get_uc_active_config() - if x < 19: - print("AP is Broadcasting Applied Config") - allure.attach(name="Success : Active Config in AP: ", body=str(ap_config_active)) - - else: - print("AP is Not Broadcasting Applied Config") - allure.attach(name="Failed to Apply Config : Active Config in AP : ", body=str(ap_config_active)) - time.sleep(50) - try: - iwinfo = ap_ssh.iwinfo() - allure.attach(name="iwinfo: ", body=str(iwinfo)) - except: - pass - 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: ") - - wifi_status = ap_ssh.get_wifi_status() - allure.attach(name="wifi status", body=str(wifi_status)) - - try: - ssid_info_sdk = instantiate_profile_obj.get_ssid_info() - - ap_wifi_data = ap_ssh.get_iwinfo() - - for p in ap_wifi_data: - for q in ssid_info_sdk: - if ap_wifi_data[p][0] == q[0] and ap_wifi_data[p][2] == q[3]: - q.append(ap_wifi_data[p][1]) - - ssid_data = [] - idx_mapping = {} - print(ssid_info_sdk) - for interface in range(len(ssid_info_sdk)): - ssid = ["ssid_idx=" + str(interface) + - " ssid=" + ssid_info_sdk[interface][0] + - " security=" + ssid_info_sdk[interface][1].upper() + - " password=" + ssid_info_sdk[interface][2] + - " bssid=" + ssid_info_sdk[interface][4].lower() - ] - idx_mapping[str(interface)] = [ssid_info_sdk[interface][0], - ssid_info_sdk[interface][2], - ssid_info_sdk[interface][1], - ssid_info_sdk[interface][3], - ssid_info_sdk[interface][4].lower() - ] - ssid_data.append(ssid) - lf_tools.ssid_list.append(ssid_info_sdk[interface][0]) - if not skip_lf: - lf_tools.dut_idx_mapping = idx_mapping - lf_tools.update_ssid(ssid_data=ssid_data) - except Exception as e: - print(e) - pass - - # Adding memory Profile code after applying config - output = ap_ssh.get_memory_profile() - allure.attach(name="ucode /usr/share/ucentral/sysinfo.uc ", body=str(output)) - - def teardown_session(): - wifi_status = ap_ssh.get_wifi_status() - allure.attach(name="wifi status", body=str(wifi_status)) - - iwinfo = ap_ssh.iwinfo() - allure.attach(name="iwinfo: ", body=str(iwinfo)) - - print("\nTeardown") - - request.addfinalizer(teardown_session) - - def collect_logs_lf(): - ip = get_configuration["traffic_generator"]["details"]["ip"] - port = get_configuration["traffic_generator"]["details"]["ssh_port"] - log_0 = "/home/lanforge/lanforge_log_0.txt" - log_1 = "/home/lanforge/lanforge_log_1.txt" - obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_0, - local_path=".") - obj.pull_file() - allure.attach.file(source="lanforge_log_0.txt", - name="lanforge_log_0") - obj = SCP_File(ip=ip, port=port, username="root", password="lanforge", remote_path=log_1, - local_path=".") - obj.pull_file() - allure.attach.file(source="lanforge_log_1.txt", - name="lanforge_log_1") - - if push_config_exception_variable: - request.addfinalizer(collect_logs_lf) - - return test_cases - - def setup_mesh_profile(self, request, param, get_apnos, get_configuration, setup_controller, instantiate_profile, - get_markers, get_equipment_ref, lf_tools, skip_lf=False, open_flow=None): - mesh_scenario = lf_tools.create_mesh_scenario() - instantiate_profile_obj = instantiate_profile(sdk_client=setup_controller) - print(1, instantiate_profile_obj.sdk_client) - vlan_id, mode = 0, 0 - parameter = dict(param) - print("parameter", parameter) - print(list(parameter["ssid_modes"])[0]) - ssid_info_sdk = instantiate_profile_obj.get_ssid_info() - print(ssid_info_sdk) - test_cases = {} - profile_data = {} - var = "" - if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter['mode']) - return test_cases - instantiate_profile_obj.set_radio_config() - if parameter['mode'] == "NAT": - mode = "NAT" - instantiate_profile_obj.set_mode(mode=mode, mesh=True) - vlan_id = 1 - if parameter['mode'] == "BRIDGE": - mode = "BRIDGE" - instantiate_profile_obj.set_mode(mode=mode, mesh=True) - vlan_id = 1 - if parameter['mode'] == "VLAN": - mode = "VLAN" - instantiate_profile_obj.set_mode(mode=mode, mesh=True) - - profile_data["ssid"] = {} - - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - data = parameter["ssid_modes"][i][j] - profile_data["ssid"][i].append(data) - lf_dut_data = [] - - for mode in profile_data['ssid']: - if mode == "open": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'none' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa_2g"] = False - if mode == "wpa": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'psk' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa_2g"] = False - if mode == "wpa2_personal": - for j in profile_data["ssid"][mode]: - - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'psk2' - creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - - try: - if parameter['mesh']: - print("yes") - instantiate_profile_obj.set_mesh_services() - except Exception as e: - pass - - - dut_data = [] - ssid_data = [] - # this will return configuration of your testbed from tests/conftest.py get_configuration fixtures - print("get configuration", get_configuration) - print(len(get_configuration['access_point'])) - print(get_configuration['access_point']) - for length in range(0, len(get_configuration['access_point'])): - ap_ssh = get_apnos(credentials=get_configuration['access_point'][length], pwd="../libs/apnos/", sdk="2.x") - connected, latest, active = ap_ssh.get_ucentral_status() - print("connected", connected) - print("latest", latest) - print("active", active) - latest_old = latest - if connected == False: - output = ap_ssh.run_generic_command(cmd="ubus call ucentral status") - allure.attach(name="ubus call ucentral status: ", body=str(output)) - pytest.exit("AP is disconnected from UC Gateway") - - if latest != active: - allure.attach(name="FAIL : ubus call ucentral status: ", - body="connected: " + str(connected) + "\nlatest: " + str(latest) + "\nactive: " + str( - active)) - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="FAILURE: AP LOgs: ") - pytest.fail("AP is disconnected from UC Gateway") - - S = 10 - - # Add logger command before config push - instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S)) - ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name) - - time_1 = time.time() - - # Apply config - print("get equipment id ref ", get_equipment_ref) - print("get equipment id ref [0]", get_equipment_ref[length]) - instantiate_profile_obj.push_config(serial_number=get_equipment_ref[length]) - - config = json.loads(str(instantiate_profile_obj.base_profile_config).replace(" ", "").replace("'", '"').replace("True", "true")) - config["uuid"] = 0 - - # Attach the config that is sent from API - allure.attach(name="Config Sent from API: ", body=str(config), attachment_type=allure.attachment_type.JSON) - - ap_config_latest = ap_ssh.get_uc_latest_config() - try: - ap_config_latest["uuid"] = 0 - except Exception as e: - print(e) - pass - x = 1 - - # Check if ucentral gw has pushed the config into latest - connected, latest, active = ap_ssh.get_ucentral_status() - while latest_old == latest: - time.sleep(5) - x += 1 - print("old config: ", latest_old) - print("latest: ", latest) - connected, latest, active = ap_ssh.get_ucentral_status() - if x == 5: - break - onnected, latest, active = ap_ssh.get_ucentral_status() - if latest == latest_old: - latest_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest)) - allure.attach(name="Latest Config Received by AP: ", - body=str(latest_cfg), - attachment_type=allure.attachment_type.JSON) - 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: ") - print("Config from ucentral gw is not sent to AP") - else: - print("Config is sent to AP from ucentral gw") - - x = 1 - latest_cfg = ap_ssh.run_generic_command(cmd="cat /etc/ucentral/ucentral.cfg." + str(latest)) - allure.attach(name="Latest Config Received by AP: ", - body=str(latest_cfg), - attachment_type=allure.attachment_type.JSON) - - while active != latest: - connected, latest, active = ap_ssh.get_ucentral_status() - time.sleep(20) - x += 1 - print("active: ", active) - print("latest: ", latest) - if x == 10: - break - - connected, latest, active = ap_ssh.get_ucentral_status() - if latest == active: - print("Config properly Applied on AP") - else: - print("Config is not Applied on AP") - - time_2 = time.time() - time_interval = time_2 - time_1 - allure.attach(name="Time Took to apply Config: " + str(time_interval), body="") - - time.sleep(60) - - ap_config_latest = ap_ssh.get_uc_latest_config() - ap_config_active = ap_ssh.get_uc_active_config() - if x < 19: - print("AP is Broadcasting Applied Config") - allure.attach(name="Success : Active Config in AP: ", body=str(ap_config_active)) - - else: - print("AP is Not Broadcasting Applied Config") - allure.attach(name="Failed to Apply Config : Active Config in AP : ", body=str(ap_config_active)) - time.sleep(10) - - try: - iwinfo = ap_ssh.iwinfo() - allure.attach(name="iwinfo: ", body=str(iwinfo)) - except: - pass - 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: ") - - wifi_status = ap_ssh.get_wifi_status() - allure.attach(name="wifi status", body=str(wifi_status)) - - try: - ssid_info_sdk = instantiate_profile_obj.get_ssid_info() - print("ssid_info_sdk", ssid_info_sdk) - ap_wifi_data = ap_ssh.get_iwinfo() - print("ap_wifi_data", ap_wifi_data) - print(type(ap_wifi_data)) - - for p in ap_wifi_data: - print(p) - for q in ssid_info_sdk: - if ap_wifi_data[p][0] == q[0] and ap_wifi_data[p][2] == q[3]: - q.append(ap_wifi_data[p][1]) - - - idx_mapping = {} - print(ssid_info_sdk) - dut_data.append(ssid_info_sdk) - - except Exception as e: - print(e) - pass - print("ssid_data", ssid_data) - print("dut", dut_data) - dut_ssid_data = [] - dut_final_data = [] - dut_1 = [] - dut_2 = [] - dut_3 = [] - for dut in range(len(dut_data)): - for interface in range(len(dut_data[dut])): - ssid = ["ssid_idx=" + str(interface) + - " ssid=" + dut_data[dut][interface][0] + - " security=" + dut_data[dut][interface][1].upper() + - " password=" + dut_data[dut][interface][2] + - " bssid=" + dut_data[dut][interface][4].lower() - ] - #print(ssid) - dut_ssid_data.append(ssid) - # print("dut ssid data", dut_ssid_data) - dut_1.append(dut_ssid_data[0]) - dut_1.append(dut_ssid_data[1]) - dut_2.append(dut_ssid_data[2]) - dut_2.append(dut_ssid_data[3]) - dut_3.append(dut_ssid_data[4]) - dut_3.append(dut_ssid_data[5]) - dut_final_data.append(dut_1) - dut_final_data.append(dut_2) - dut_final_data.append(dut_3) - print("dut_final_data", dut_final_data) - # dut_final_data = [[['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=34:ef:b6:af:4a:84'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=34:ef:b6:af:4a:7c']], [['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=34:ef:b6:af:49:0d'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=34:ef:b6:af:49:05']], [['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=90:3c:b3:9d:69:36'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=90:3c:b3:9d:69:2e']]] - - # dut creation for mesh - # dut_ssid_data = [[['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=34:ef:b6:af:4a:84'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=34:ef:b6:af:4a:7c']], [['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=34:ef:b6:af:49:0d'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=34:ef:b6:af:49:05']], [['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=90:3c:b3:9d:69:36'], ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=90:3c:b3:9d:69:2e']]] - create_dut = lf_tools.create_mesh_dut(ssid_data=dut_final_data) - - #create mesh scenario - #mesh_scenario = lf_tools.create_mesh_scenario() - - #check for all ap are connected and is pinging - for length in range(0, len(get_configuration['access_point'])): - ap_ssh = get_apnos(credentials=get_configuration['access_point'][length], pwd="../libs/apnos/", sdk="2.x") - print("checking again if all ap's are connected and able to reach internet") - connected, latest, active = ap_ssh.get_ucentral_status() - print("connected", connected) - print("latest", latest) - print("active", active) - latest_old = latest - if connected == False: - output = ap_ssh.run_generic_command(cmd="ubus call ucentral status") - allure.attach(name="ubus call ucentral status: ", body=str(output)) - pytest.exit("AP is disconnected from UC Gateway") - if latest != active: - allure.attach(name="FAIL : ubus call ucentral status: ", - body="connected: " + str(connected) + "\nlatest: " + str(latest) + "\nactive: " + str(active)) - ap_logs = ap_ssh.logread() - allure.attach(body=ap_logs, name="FAILURE: AP LOgs: ") - pytest.fail("AP is disconnected from UC Gateway") - - - #create a mesh scenario with dhcp disable option to node-1 and node-2 - dhcp_dis = lf_tools.create_mesh_scenario_dhcp_disable() - - - - - - diff --git a/tests/fixtures_3x.py b/tests/fixtures_3x.py deleted file mode 100644 index 6b58a9ec8..000000000 --- a/tests/fixtures_3x.py +++ /dev/null @@ -1,400 +0,0 @@ -import allure -import pytest -import os -import sys -""" Environment Paths """ -if "libs" not in sys.path: - sys.path.append(f'../libs') -for folder in 'py-json', 'py-scripts': - if folder not in sys.path: - sys.path.append(f'../lanforge/lanforge-scripts/{folder}') - -sys.path.append( - os.path.dirname( - os.path.realpath(__file__) - ) -) -sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity") - -sys.path.append(f'../libs') -sys.path.append(f'../libs/lanforge/') -sys.path.append(f'../lanforge/lanforge-scripts') - -from LANforge.LFUtils import * - -if 'py-json' not in sys.path: - sys.path.append('../py-scripts') -from controller.controller_3x.controller import CController - - -class Fixtures_3x: - - def __init__(self, configuration={}, run_lf=False, cc_1=False): - self.lab_info = configuration - self.run_lf = run_lf - self.cc_1 = cc_1 - # print(self.lab_info) - print("cc.1") - self.controller_obj = "" - - - def setup_profiles(self, request, param, run_lf, instantiate_profile, get_configuration, get_markers, lf_tools, lf_reports): - table1= [] - instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], - timeout="10", ssid_data=None, - ap_data=self.lab_info['access_point'], type=0) - - instantiate_profile_obj.enable_all_bands() - - - if run_lf: - return 0 - print("check params") - # gives parameter value of setup_params_general - parameter = dict(param) - print("parameter", parameter) - - test_cases = {} - profile_data= {} - var = "" - list_key = list(parameter.keys()) - - if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]: - print("Invalid Mode: ", parameter['mode']) - return test_cases - profile_data["ssid"] = {} - lf_dut_data = [] - for i in parameter["ssid_modes"]: - profile_data["ssid"][i] = [] - for j in range(len(parameter["ssid_modes"][i])): - data = parameter["ssid_modes"][i][j] - profile_data["ssid"][i].append(data) - - # profile data will give ssid data like {'ssid': {'wpa2_personal': [{'ssid_name': 'ssid_wpa2_2g', 'appliedRadios': ['2G'], 'security_key': 'something'}, {'ssid_name': 'ssid_wpa2_5g', 'appliedRadios': ['5G'], 'security_key': 'something'}], 'wpa3_personal': [{'ssid_name': 'ssid_wpa2_5g', 'appliedRadios': ['6G'], 'security_key': 'something'}]}} - print("profile data", profile_data) - - - # create wlan - for mode in profile_data['ssid']: - if mode == "wpa2_personal": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("6G"): - lf_dut_data.append(j) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'wpa2' - # print("dut data", lf_dut_data) - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa2_personal"] = False - if mode == "wpa3_personal": - for j in profile_data["ssid"][mode]: - if mode in get_markers.keys() and get_markers[mode]: - print( profile_data["ssid"][mode]) - print(j) - try: - if j["appliedRadios"].__contains__("2G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("5G"): - lf_dut_data.append(j) - if j["appliedRadios"].__contains__("6G"): - lf_dut_data.append(j) - print(lf_dut_data) - j["appliedRadios"] = list(set(j["appliedRadios"])) - j['security'] = 'wpa3' - test_cases["wpa_2g"] = True - except Exception as e: - print(e) - test_cases["wpa3_personal"] = False - - # lf dut data [{'ssid_name': 'ssid_wpa2_2g', 'appliedRadios': ['2G'], 'security_key': 'something', 'security': 'wpa2'}, {'ssid_name': 'ssid_wpa2_5g', 'appliedRadios': ['5G'], 'security_key': 'something', 'security': 'wpa2'}, {'ssid_name': 'ssid_wpa2_5g', 'appliedRadios': ['6G'], 'security_key': 'something', 'security': 'wpa3'}] - print("lf dut data", lf_dut_data) - allure.attach(name="wlan data passing", body=str(parameter)) - ap = instantiate_profile_obj.show_ap_summary() - print("show ap summ", ap) - allure.attach(name="show ap summary", body=str(ap)) - - print("create 3 wlans on slot1,2 and 3") - for ap_name in range(len(self.lab_info['access_point'])): - print("ap ", ap_name) - # instantiate controller object - - print("set channel and bandwidth") - instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], - timeout="10", ssid_data=lf_dut_data, - ap_data=self.lab_info['access_point'], type=ap_name) - instantiate_profile_obj.set_channel(band="6g", channel=self.lab_info['access_point'][ap_name]["channel_6g"], - slot=self.lab_info['access_point'][ap_name]["6g_slot"]) - allure.attach(name="set 6g channel on " + str(ap_name + 1) + " ap ", body=str(self.lab_info['access_point'][ap_name]["channel_6g"])) - instantiate_profile_obj.set_channel(band="5g", channel=self.lab_info['access_point'][ap_name]["channel_5g"], - slot=self.lab_info['access_point'][ap_name]["5g_slot"]) - allure.attach(name="set 5g channel on " + str(ap_name + 1) + " ap ", body=str(self.lab_info['access_point'][ap_name]["channel_5g"])) - instantiate_profile_obj.set_channel(band="2g", channel=self.lab_info['access_point'][ap_name]["channel_2g"], - slot=self.lab_info['access_point'][ap_name]["2g_slot"]) - allure.attach(name="set 2g channel on " + str(ap_name + 1) + " ap ", body=str(self.lab_info['access_point'][ap_name]["channel_2g"])) - print(self.lab_info['access_point'][ap_name]["ap_name"]) - check_admin = instantiate_profile_obj.check_admin_state_2ghz(ap_name=self.lab_info['access_point'][ap_name]["ap_name"]) - allure.attach(name="2ghz ap admin state for " + str(ap_name + 1) + " ap", body=str(check_admin)) - - check_admin_5 = instantiate_profile_obj.check_admin_state_5ghz(ap_name=self.lab_info['access_point'][ap_name]["ap_name"]) - allure.attach(name="5ghz ap admin state for " + str(ap_name + 1) + " ap", body=str(check_admin_5)) - - check_admin_6 = instantiate_profile_obj.check_admin_state_6ghz(ap_name=self.lab_info['access_point'][ap_name]["ap_name"]) - allure.attach(name="6ghz ap admin state for " + str(ap_name + 1) + " ap", body=str(check_admin_6)) - - # table1.append(tab) - - - if ap_name == 0: - for band in range(len(lf_dut_data)): - if lf_dut_data[band]["appliedRadios"] == ["2G"]: - instantiate_profile_obj.no_logging_console() - instantiate_profile_obj.line_console() - id_slot = instantiate_profile_obj.get_slot_id_wlan() - ssid_name = instantiate_profile_obj.get_ssid_name_on_id() - if id_slot[0] == "1": - instantiate_profile_obj.show_shutdown_2ghz_ap() - instantiate_profile_obj.disable_wlan(wlan=ssid_name[0]) - instantiate_profile_obj.ap_2ghz_shutdown() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.delete_wlan(ssid=ssid_name[0]) - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa2(id="1", wlan=lf_dut_data[0]['ssid_name'], - wlanssid=lf_dut_data[0]['ssid_name'], - key=lf_dut_data[0]['security_key']) - else: - print(lf_dut_data[0]['ssid_name']) - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.show_shutdown_2ghz_ap() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa2(id="1", wlan=lf_dut_data[0]['ssid_name'], - wlanssid=lf_dut_data[0]['ssid_name'], - key=lf_dut_data[0]['security_key']) - instantiate_profile_obj.get_ssids() - - if "roam_type" not in list_key: - # add wlan to single ap - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile(wlan=lf_dut_data[0]['ssid_name']) - instantiate_profile_obj.enable_wlan( wlan=lf_dut_data[0]['ssid_name']) - instantiate_profile_obj.enable_2ghz_netwrk(id="1", wlan=lf_dut_data[0]['ssid_name'], - wlanssid=lf_dut_data[0]['ssid_name'], - key=lf_dut_data[0]['security_key']) - instantiate_profile_obj.enable_ap_2ghz() - if parameter["ft+psk"] == True: - instantiate_profile_obj.enable_ft_psk(ssid=lf_dut_data[0]['ssid_name'], - key=lf_dut_data[0]['security_key']) - if parameter["ft-otd"] == True: - instantiate_profile_obj.enable_ftotd_psk(ssid=lf_dut_data[0]['ssid_name'], - key=lf_dut_data[0]['security_key']) - - if 'dtim' in list_key: - instantiate_profile_obj.set_dtim_2ghz(wlan=lf_dut_data[0]['ssid_name'], value=parameter["dtim"]) - instantiate_profile_obj.get_ssids() - - if lf_dut_data[band]["appliedRadios"] == ["5G"]: - instantiate_profile_obj.no_logging_console() - instantiate_profile_obj.line_console() - id_slot = instantiate_profile_obj.get_slot_id_wlan() - print(id_slot) - ssid_name = instantiate_profile_obj.get_ssid_name_on_id() - print(ssid_name) - if id_slot[1] == "2": - # if ssid present on slot 2 delete it and create new - instantiate_profile_obj.show_shutdown_5ghz_ap() - instantiate_profile_obj.disable_wlan(wlan=ssid_name[1]) - instantiate_profile_obj.ap_5ghz_shutdown() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.delete_wlan(ssid=ssid_name[1]) - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa2(id="2", wlan=lf_dut_data[1]['ssid_name'], - wlanssid=lf_dut_data[1]['ssid_name'], - key=lf_dut_data[1]['security_key']) - else: - print(lf_dut_data[1]['ssid_name']) - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.show_shutdown_5ghz_ap() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa2(id="2", wlan=lf_dut_data[1]['ssid_name'], - wlanssid=lf_dut_data[1]['ssid_name'], - key=lf_dut_data[1]['security_key']) - instantiate_profile_obj.get_ssids() - - if "roam_type" not in list_key: - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile(wlan=lf_dut_data[1]['ssid_name']) - instantiate_profile_obj.enable_wlan(wlan=lf_dut_data[1]['ssid_name']) - instantiate_profile_obj.enable_5ghz_netwrk(id="2", wlan=lf_dut_data[1]['ssid_name'], - wlanssid=lf_dut_data[1]['ssid_name'], - key=lf_dut_data[1]['security_key']) - instantiate_profile_obj.enable_ap_5ghz() - if parameter["ft+psk"] == True: - instantiate_profile_obj.enable_ft_psk(ssid=lf_dut_data[1]['ssid_name'], - key=lf_dut_data[1]['security_key']) - if parameter["ft-otd"] == True: - instantiate_profile_obj.enable_ftotd_psk(ssid=lf_dut_data[1]['ssid_name'], - key=lf_dut_data[1]['security_key']) - if 'dtim' in list_key: - instantiate_profile_obj.set_dtim_5ghz(wlan=lf_dut_data[1]['ssid_name'], value=parameter["dtim"]) - - instantiate_profile_obj.get_ssids() - if lf_dut_data[band]["appliedRadios"] == ["6G"]: - instantiate_profile_obj.no_logging_console() - instantiate_profile_obj.line_console() - id_slot = instantiate_profile_obj.get_slot_id_wlan() - print(id_slot) - ssid_name = instantiate_profile_obj.get_ssid_name_on_id() - print(ssid_name) - if id_slot[2] == "3": - instantiate_profile_obj.show_shutdown_6ghz_ap() - # instantiate_profile_obj.show_shutdown_5ghz_ap() - # instantiate_profile_obj.show_shutdown_2ghz_ap() - instantiate_profile_obj.disable_wlan(wlan=ssid_name[2]) - instantiate_profile_obj.ap_6ghz_shutdown() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.delete_wlan(ssid=ssid_name[2]) - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa3(id="3", wlan=lf_dut_data[2]['ssid_name'], - wlanssid=lf_dut_data[2]['ssid_name'], - key=lf_dut_data[2]['security_key']) - else: - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.show_shutdown_6ghz_ap() - instantiate_profile_obj.get_ssids() - instantiate_profile_obj.create_wlan_wpa3(id="3", wlan=lf_dut_data[2]['ssid_name'], - wlanssid=lf_dut_data[2]['ssid_name'], - key=lf_dut_data[2]['security_key']) - instantiate_profile_obj.get_ssids() - - if "roam_type" not in list_key: - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile( - wlan=lf_dut_data[2]['ssid_name']) - instantiate_profile_obj.enable_wlan( wlan=lf_dut_data[2]['ssid_name']) - instantiate_profile_obj.enable_6ghz_netwrk(id="3", wlan=lf_dut_data[2]['ssid_name'], - wlanssid=lf_dut_data[2]['ssid_name'], - key=lf_dut_data[2]['security_key']) - instantiate_profile_obj.enable_ap_6ghz() - # if parameter["ft+psk"] == True: - # instantiate_profile_obj.enable_ft_sae(ssid=lf_dut_data[2]['ssid_name'], key=lf_dut_data[2]['security_key']) - if parameter["ft-dot1x"] == True: - instantiate_profile_obj.enable_ft_dot1x_wpa3(ssid=lf_dut_data[2]['ssid_name']) - if parameter["ft-dot1x_sha256"] == True: - instantiate_profile_obj.enable_ft_dot1x_sha256_wpa3(ssid=lf_dut_data[2]['ssid_name'], - radius=get_configuration['controller']["radius"]) - instantiate_profile_obj.get_ssids() - - twog_sum = instantiate_profile_obj.show_2ghz_summary() - fiveg_sum = instantiate_profile_obj.show_5ghz_summary() - sixg_sum = instantiate_profile_obj.show_6ghz_summary() - allure.attach(name="ap admin state 2ghz ", body=str(twog_sum)) - allure.attach(name="ap admin state 5ghz ", body=str(fiveg_sum)) - allure.attach(name="ap admin state 6ghz", body=str(sixg_sum)) - sumy = instantiate_profile_obj.get_ssids() - allure.attach(name="wlan summary after creating test wlan", body=str(sumy)) - if "roam_type" in list_key: - print("after creating wlan's assign wlan to respective tag policy") - for ap_name in range(len(self.lab_info['access_point'])): - print("ap ", ap_name) - instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], timeout="10", - ssid_data=lf_dut_data, ap_data=self.lab_info['access_point'], - type=ap_name) - if parameter["roam_type"] == "fiveg_to_fiveg": - # add 5g wlan to both ap's - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile(wlan=lf_dut_data[1]['ssid_name']) - if parameter["roam_type"] == "fiveg_to_sixg": - if ap_name == 0: - # add 5g ssid to 5g ap - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile(wlan=lf_dut_data[1]['ssid_name']) - if ap_name == 1: - # add 6g ssid to 6g ap - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile(wlan=lf_dut_data[2]['ssid_name']) - - else: - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile( - wlan=lf_dut_data[0]['ssid_name']) - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile( - wlan=lf_dut_data[1]['ssid_name']) - instantiate_profile_obj.config_wireless_tag_policy_and_policy_profile( - wlan=lf_dut_data[2]['ssid_name']) - - - - - bssid_list_2g = [] - bssid_list_5g = [] - ssid_data_list = [] - - for ap_name in range(len(self.lab_info['access_point'])): - print("ap ", ap_name) - # instantiate controller object - instantiate_profile_obj = instantiate_profile(controller_data=get_configuration['controller'], timeout="10", - ssid_data=lf_dut_data, ap_data=self.lab_info['access_point'], type=ap_name) - bss2_info = instantiate_profile_obj.get_ap_bssid_2g() - allure.attach(name="wlan 2g bssid info", body=str(bss2_info)) - bss5_info = instantiate_profile_obj.get_ap_bssid_5g() - allure.attach(name="wlan 5g bssid info", body=str(bss5_info)) - bss6_info = instantiate_profile_obj.get_ap_bssid_6g() - allure.attach(name="wlan 6g bssid info", body=str(bss6_info)) - - bssid_2g = instantiate_profile_obj.cal_bssid_2g() - print("bssid 2g", bssid_2g) - lst_2g = bssid_list_2g.append(bssid_2g) - - bssid_5g = instantiate_profile_obj.cal_bssid_5g() - print("bssid 5g ", bssid_5g) - lst_5g = bssid_list_5g.append(bssid_5g) - # print(bssid_5g) - # print(bssid_list_2g) - # print(bssid_list_5g) - ssid_data = [] - try: - idx_mapping = {} - bssid = "" - for interface in range(len(lf_dut_data)): - if interface == 0: - bssid = bssid_2g - if interface == 1: - bssid = bssid_5g - if lf_dut_data[interface]['security'] == "psk2": - lf_dut_data[interface]['security'] = "WPA2" - ssid = ["ssid_idx=" + str(interface) + - " ssid=" + lf_dut_data[interface]['ssid_name'] + - " security=" + lf_dut_data[interface]['security'] + - " password=" + lf_dut_data[interface]['security_key'] + - " bssid=" + bssid - ] - ssid_data.append(ssid) - - except Exception as e: - print(e) - pass - # print("nikita",ssid_data) - ssid_data_list.append(ssid_data) - print("final ssid data", ssid_data_list) - # ssid_data = [[['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=68:7d:b4:5f:5c:30'], - # ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=68:7d:b4:5f:5c:3e']], - # [['ssid_idx=0 ssid=ssid_wpa2_2g security=WPA2 password=something bssid=14:16:9d:53:58:c0'], - # ['ssid_idx=1 ssid=ssid_wpa2_5g security=WPA2 password=something bssid=14:16:9d:53:58:ce']]] - lf_tools.create_non_meh_dut(ssid_data=ssid_data_list) - table1 = [["show ap summary", "done"], ["Configure wlan", "done"], ["configure channel/width", "done"], - ["ap admin state up", "done"], ["checking admin state of ap", "done"], - ["sniffer capture", "done"], - ["client connect", "don"], ["roam", "done"], ["sniffer verification", "done"], - ["iteration", "done"], - ["table display", "done"], ["check in controller client connected", "done"], - ["Bring down unused band before start of testcase", "done"]] - tab1 = lf_reports.table2(table=table1) - allure.attach(name="skeleton of code", body=str(tab1)) - - - - - - - - - diff --git a/tests/lab_info.json b/tests/lab_info.json index 006626fc4..0cdde160d 100644 --- a/tests/lab_info.json +++ b/tests/lab_info.json @@ -1,1185 +1,333 @@ { - -"CONFIGURATION" : { - "basic-01": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "wallys_dr40x9", - "mode": "wifi5", - "serial": "c44bd1005b30", - "jumphost": true, - "ip": "10.28.3.100", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP8", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.6", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan1", - "AX-Station-Name": "ax" - } - } - }, - "basic-02": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "hfcl_ion4", - "mode": "wifi5", - "serial": "0006aee53b84", - "jumphost": true, - "ip": "192.168.52.89", - "username": "lanforge", - "password": "lanforge", - "port": 22, - "jumphost_tty": "/dev/ttyAP2", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "192.168.52.89", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-03": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "tp-link_ec420-g1", - "mode": "wifi5", - "serial": "001122090801", - "jumphost": true, - "ip": "10.28.3.100", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP3", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.10", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "sta00", - "5G-Station-Name": "sta10", - "AX-Station-Name": "ax" - } - } - }, - "basic-03a": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "indio_um-305ac", - "mode": "wifi5", - "serial": "706dec0a8a79", - "jumphost": true, - "ip": "10.28.3.100", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP6", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.10", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "sta00", - "5G-Station-Name": "sta10", - "AX-Station-Name": "ax" - } - } - }, - "basic-04": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_ecw5211", - "mode": "wifi5", - "serial": "68215fda456d", - "jumphost": true, - "ip": "10.28.3.100", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP5", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.12", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-04a": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "hfcl_ion4xi", - "mode": "wifi5", - "serial": "0006ae6df11f", - "jumphost": true, - "ip": "10.28.3.100", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP7", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.12", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy5"], - "AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-05": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "cig_wf188n", - "mode": "wifi6", - "serial": "0000c1018812", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP1", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.28", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth1", - "2.4G-Station-Name": "sta00", - "5G-Station-Name": "sta10", - "AX-Station-Name": "ax" - } - } - }, - "basic-06": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb39d6918", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP2", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.30", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-06a": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "hfcl_ion4xe", - "mode": "wifi6", - "serial": "0006ae6f7007", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP7", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.30", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-07": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "903cb36ae223", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP3", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.32", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "sta10", - "5G-Station-Name": "sta00", - "AX-Station-Name": "ax" - } - } - }, - "basic-08": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "cig_wf194c", - "mode": "wifi6", - "serial": "00c115194c15", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP5", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.34", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - "basic-08a": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "udaya_a5-id2", - "mode": "wifi6", - "serial": "50987100327b", - "jumphost": true, - "ip": "10.28.3.103", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP6", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.34", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - }, - - "advanced-01": { - "controller": { - "url":"https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "cig_wf194c4", - "mode": "wifi6", - "serial": "f40b9fe78e03", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP2", - "version": "release-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.24", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2","1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3", "1.1.wiphy5"], - "AX-Radio": [], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - - }, - "advanced-02": { - "controller": { - "url":"https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb39d6958", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22 , - "jumphost_tty": "/dev/ttyAP3", - "version": "release-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.26", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2","1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3", "1.1.wiphy5"], - "AX-Radio": [], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - - }, - "advanced-03": { - "controller": { - "url":"https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "cig_wf196", - "mode": "wifi6", - "serial": "824f816011e4", - "jumphost": true, - "ip": "10.28.3.115", - "username": "lanforge", - "password": "pumpkin77", - "port": 22 , - "jumphost_tty": "/dev/ttyAP0", - "version": "release-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.117", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2","1.1.wiphy4"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3", "1.1.wiphy5"], - "AX-Radio": ["1.2.wiphy0", "1.2.wiphy1", "1.2.wiphy2", "1.2.wiphy3", "1.2.wiphy4", "1.2.wiphy5", "1.2.wiphy6", "1.2.wiphy7", "1.2.wiphy8", - "1.2.wiphy9", "1.2.wiphy10", "1.2.wiphy11", "1.3.wiphy0", "1.3.wiphy1", "1.3.wiphy2", "1.3.wiphy3", "1.3.wiphy4", "1.3.wiphy5", - "1.3.wiphy6", "1.3.wiphy7", "1.3.wiphy8", "1.3.wiphy9", "1.3.wiphy10", "1.3.wiphy11", "1.3.wiphy12", "1.3.wiphy13", "1.3.wiphy14", - "1.3.wiphy15", "1.3.wiphy16", "1.3.wiphy17", "1.3.wiphy18", "1.3.wiphy19", "1.3.wiphy20", "1.3.wiphy21", "1.3.wiphy22", "1.3.wiphy23"], - "upstream": "1.3.eth2", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.3.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - } - - }, - "mesh-01": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "type" : "root", - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "34efb6af4a7a", - "jumphost": true, - "ip": "10.28.3.101", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP2", - "version": "next-latest" + "CONFIGURATION": { + "basic-testbed": { + "target": "tip_2x", + "controller": { + "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", + "username": "tip@ucentral.com", + "password": "OpenWifi%123" + }, + "device_under_tests": [ + { + "model": "edgecore_eap101", + "supported_bands": [ + "2G", + "5G" + ], + "supported_modes": [ + "BRIDGE", + "NAT", + "VLAN" + ], + "wan_port": "1.1.eth3", + "lan_port": null, + "ssid": { + "mode": "BRIDGE", + "ssid_data": { + "0": { + "ssid": "ssid_wpa2_2g", + "encryption": "wpa2", + "password": "something", + "band": "fiveg", + "bssid": "90:3C:B3:6C:43:05" + }, + "1": { + "ssid": "ssid_wpa2_2g", + "encryption": "wpa2", + "password": "something", + "band": "twog", + "bssid": "90:3C:B3:6C:43:04" + } }, - { - "type": "node-1", - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "34efb6af4903", - "jumphost": true, - "ip": "10.28.3.101", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP3", - "version": "next-latest" - }, - { - "type": "node-2", - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb39d692c", - "jumphost": true, - "ip": "10.28.3.101", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP4", - "version": "next-latest" + "radio_data": { + "2G": { + "channel": 1, + "bandwidth": 20, + "frequency": 2412 + }, + "5G": { + "channel": 52, + "bandwidth": 80, + "frequency": 5290 + }, + "6G": { + "channel": null, + "bandwidth": null, + "frequency": null + } } - ], - "traffic_generator": { - "name": "lanforge-mesh", - "details": { - "type": "mesh", - "ip": "10.28.3.14", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio-mobile-sta": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio-mobile-sta": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio-mobile-sta": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream-mobile-sta": "1.1.eth2", - "upstream_subnet-mobile-sta": "10.28.2.1/24", - "uplink-mobile-sta": "1.1.eth3", - "2.4G-Radio-root": ["1.2.wiphy0"], - "5G-Radio-root": ["1.2.wiphy1"], - "AX-Radio-root": [], - "upstream-root": "1.2.eth2", - "upstream_subnet-root": "10.28.2.1/24", - "uplink-root": "1.2.eth3", - "2.4G-Radio-node-1": ["1.3.wiphy0"], - "5G-Radio-node-1": ["1.3.wiphy1"], - "AX-Radio-node-1": [], - "upstream-node-1": "1.3.eth2", - "upstream_subnet-node-1": "10.28.2.1/24", - "uplink--node-1": "1.3.eth3", - "2.4G-Radio-node-2": ["1.4.wiphy0"], - "5G-Radio-node-2": ["1.4.wiphy1"], - "AX-Radio-node-2": [], - "upstream-node-2": "1.4.eth2", - "upstream_subnet-node-2": "10.28.2.1/24", - "uplink--node-2": "1.4.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - + }, + "mode": "wifi6", + "identifier": "903cb36c4301", + "method": "serial", + "host_ip": "192.168.52.89", + "host_username": "lanforge", + "host_password": "lanforge", + "host_ssh_port": 22, + "serial_tty": "/dev/ttyUSB0", + "firmware_version": "next-latest" } - }, - "mesh-02": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "type" : "root", - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb3bd72dd", - "jumphost": true, - "ip": "10.28.3.104", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP2", - "version": "next-latest" - }, - { - "type": "node-1", - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb3bd72fd", - "jumphost": true, - "ip": "10.28.3.104", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP3", - "version": "next-latest" - }, - { - "type": "node-2", - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb3bd732d", - "jumphost": true, - "ip": "10.28.3.104", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP4", - "version": "next-latest" + ], + "traffic_generator": { + "name": "lanforge", + "testbed": "basic", + "scenario": "dhcp-bridge", + "details": { + "manager_ip": "192.168.52.89", + "http_port": 8080, + "ssh_port": 22, + "setup": { + "method": "build", + "DB": "Test_Scenario_Automation" + }, + "wan_ports": { + "1.1.eth3": { + "addressing": "dhcp-server", + "subnet": "172.16.0.1/16", + "dhcp": { + "lease-first": 10, + "lease-count": 10000, + "lease-time": "6h" + } } - ], - "traffic_generator": { - "name": "lanforge-mesh", - "details": { - "type": "mesh", - "ip": "10.28.3.36", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio-mobile-sta": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio-mobile-sta": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio-mobile-sta": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream-mobile-sta": "1.1.eth2", - "upstream_subnet-mobile-sta": "10.28.2.1/24", - "uplink-mobile-sta": "1.1.eth3", - "2.4G-Radio-root": ["1.2.wiphy0"], - "5G-Radio-root": ["1.2.wiphy1"], - "AX-Radio-root": [], - "upstream-root": "1.2.eth2", - "upstream_subnet-root": "10.28.2.1/24", - "uplink-root": "1.2.eth3", - "2.4G-Radio-node-1": ["1.3.wiphy0"], - "5G-Radio-node-1": ["1.3.wiphy1"], - "AX-Radio-node-1": [], - "upstream-node-1": "1.3.eth2", - "upstream_subnet-node-1": "10.28.2.1/24", - "uplink--node-1": "1.3.eth3", - "2.4G-Radio-node-2": ["1.4.wiphy0"], - "5G-Radio-node-2": ["1.4.wiphy1"], - "AX-Radio-node-2": [], - "upstream-node-2": "1.4.eth2", - "upstream_subnet-node-2": "10.28.2.1/24", - "uplink--node-2": "1.4.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" - } - - } - }, - - "interop-01": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap102", - "mode": "wifi6", - "serial": "903cb39d69c0", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP1", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.22", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan1", - "AX-Station-Name": "ax", - "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw", - "perfectoURL": "tip" - } - } - }, - - "interop-02": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "903cb36ae4a3", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP4", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.22", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan1", - "AX-Station-Name": "ax", - "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw", - "perfectoURL": "tip" - } - } - }, - - "interop-03": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "edgecore_eap101", - "mode": "wifi6", - "serial": "903cb36ae255", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP5", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.22", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan1", - "AX-Station-Name": "ax", - "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw", - "perfectoURL": "tip" - } - } - }, - - "interop-04": { - "controller": { - "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001", - "username": "tip@ucentral.com", - "password": "OpenWifi%123" - }, - "access_point": [ - { - "model": "cig_wf194c4", - "mode": "wifi6", - "serial": "f40b9fe78d3d", - "jumphost": true, - "ip": "10.28.3.102", - "username": "lanforge", - "password": "pumpkin77", - "port": 22, - "jumphost_tty": "/dev/ttyAP7", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "10.28.3.22", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2"], - "5G-Radio": ["1.1.wiphy1", "1.1.wiphy3"], - "AX-Radio": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"], - "upstream": "1.1.eth1", - "upstream_subnet": "10.28.2.1/24", - "uplink": "1.1.eth3", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan1", - "AX-Station-Name": "ax", - "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw", - "perfectoURL": "tip" - } - } - }, - - "basic-ext-03-03": { - "controller": { - "url": "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", - "username": "support@example.com", - "password": "support", - "version": "1.1.0-SNAPSHOT", - "commit_date": "2021-04-27" - }, - "access_point": [ - { - "model": "ecw5410", - "mode": "wifi5", - "serial": "903cb3944857", - "jumphost": true, - "ip": "192.168.200.80", - "username": "lanforge", - "password": "lanforge", - "port": 22, - "jumphost_tty": "/dev/ttyAP1", - "version": "next-latest" - } - ], - "traffic_generator": { - "name": "lanforge", - "details": { - "ip": "192.168.200.80", - "port": 8080, - "ssh_port": 22, - "2.4G-Radio": ["wiphy0"], - "5G-Radio": ["wiphy1"], - "AX-Radio": ["wiphy2"], - "upstream": "1.1.eth1", - "upstream_subnet": "192.168.200.1/24", - "uplink": "1.1.eth2", - "2.4G-Station-Name": "wlan0", - "5G-Station-Name": "wlan0", - "AX-Station-Name": "ax" + }, + "lan_ports": {}, + "uplink_nat_ports": { + "1.1.eth2": { + "addressing": "static", + "ip": "192.168.52.150", + "gateway_ip": "192.168.52.1/24", + "ip_mask": "255.255.255.0", + "dns_servers": "BLANK" } + } } + } } -}, - -"PERFECTO_DETAILS" : { - "securityToken":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", + }, + "PERFECTO_DETAILS": { + "securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks", "projectName": "TIP-PyTest-Execution", "projectVersion": "1.0", "reportTags": "TestTag", - "perfectoURL":"tip", + "perfectoURL": "tip", + "available_devices": [ + "" + ], "iPhone-11": { - "model-iOS": "iPhone-11", - "bundleId-iOS": "com.apple.Preferences", - "platformName-iOS": "iOS", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Ping": "com.deftapps.ping", - "browserType-iOS": "Safari", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "platformName-android": "Android", - "appPackage-android": "com.android.settings", - "jobName": "Interop-iphone-11", - "jobNumber": 38 + "model-iOS": "iPhone-11", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-11", + "jobNumber": 38 }, "iPhone-12": { - "model-iOS": "iPhone-12", - "bundleId-iOS": "com.apple.Preferences", - "platformName-iOS": "iOS", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Ping": "com.deftapps.ping", - "browserType-iOS": "Safari", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "platformName-android": "Android", - "appPackage-android": "com.android.settings", - "jobName": "Interop-iphone-12", - "jobNumber": 38 + "model-iOS": "iPhone-12", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-12", + "jobNumber": 38 }, "iPhone-7": { - "model-iOS": "iPhone-7", - "bundleId-iOS": "com.apple.Preferences", - "platformName-iOS": "iOS", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Ping": "com.deftapps.ping", - "browserType-iOS": "Safari", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "platformName-android": "Android", - "appPackage-android": "com.android.settings", - "jobName": "Interop-iphone-7", - "jobNumber": 38 + "model-iOS": "iPhone-7", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-7", + "jobNumber": 38 }, "iPhone-XR": { - "model-iOS": "iPhone-XR", - "bundleId-iOS": "com.apple.Preferences", - "platformName-iOS": "iOS", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Ping": "com.deftapps.ping", - "browserType-iOS": "Safari", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "platformName-android": "Android", - "appPackage-android": "com.android.settings", - "jobName": "Interop-iphone-XR", - "jobNumber": 38 + "model-iOS": "iPhone-XR", + "bundleId-iOS": "com.apple.Preferences", + "platformName-iOS": "iOS", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Ping": "com.deftapps.ping", + "browserType-iOS": "Safari", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "platformName-android": "Android", + "appPackage-android": "com.android.settings", + "jobName": "Interop-iphone-XR", + "jobNumber": 38 }, "Galaxy S20": { - "platformName-android": "Android", - "model-android": "Galaxy S20", - "appPackage-android": "com.android.settings", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "jobName": "Interop-Galaxy-S20", - "jobNumber": 38 + "platformName-android": "Android", + "model-android": "Galaxy S20", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S20", + "jobNumber": 38 }, "Galaxy S10.*": { - "platformName-android": "Android", - "model-android": "Galaxy S10.*", - "appPackage-android": "com.android.settings", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "jobName": "Interop-Galaxy-S10", - "jobNumber": 38 + "platformName-android": "Android", + "model-android": "Galaxy S10.*", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S10", + "jobNumber": 38 }, "Galaxy S9": { - "platformName-android": "Android", - "model-android": "Galaxy S9", - "appPackage-android": "com.android.settings", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "jobName": "Interop-Galaxy-S9", - "jobNumber": 38 + "platformName-android": "Android", + "model-android": "Galaxy S9", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-Galaxy-S9", + "jobNumber": 38 }, "Pixel 4": { - "platformName-android": "Android", - "model-android": "Pixel 4", - "appPackage-android": "com.android.settings", - "bundleId-iOS-Settings": "com.apple.Preferences", - "bundleId-iOS-Safari": "com.apple.mobilesafari", - "jobName": "Interop-pixel-4", - "jobNumber": 38 + "platformName-android": "Android", + "model-android": "Pixel 4", + "appPackage-android": "com.android.settings", + "bundleId-iOS-Settings": "com.apple.Preferences", + "bundleId-iOS-Safari": "com.apple.mobilesafari", + "jobName": "Interop-pixel-4", + "jobNumber": 38 } -}, -"RADIUS_SERVER_DATA" : { - "ip": "10.10.1.221", + }, + "RADIUS_SERVER_DATA": { + "ip": "10.28.3.100", "port": 1812, "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"RADIUS_ACCOUNTING_DATA" : { - "ip": "10.10.1.221", - "port": 1813, - "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"DYNAMIC_VLAN_RADIUS_SERVER_DATA" : { - "ip": "3.20.165.131", - "port": 1812, - "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA" : { - "ip": "3.20.165.131", - "port": 1813, - "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"RATE_LIMITING_RADIUS_SERVER_DATA" : { - "ip": "18.189.85.200", - "port": 1812, - "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"RATE_LIMITING_RADIUS_ACCOUNTING_DATA" : { - "ip": "18.189.85.200", - "port": 1813, - "secret": "testing123", - "user": "user", - "password": "password", - "pk_password": "whatever" -}, - -"PASSPOINT_RADIUS_SERVER_DATA" : { - "ip": "52.234.179.191", - "port": 11812, - "secret": "yeababy20!", "user": "nolaradius", "password": "nolastart", "pk_password": "whatever" -}, - -"PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA" : { + }, + "RADIUS_ACCOUNTING_DATA": { + "ip": "10.28.3.100", + "port": 1813, + "secret": "testing123", + "user": "nolaradius", + "password": "nolastart", + "pk_password": "whatever" + }, + "DYNAMIC_VLAN_RADIUS_SERVER_DATA": { + "ip": "3.20.165.131", + "port": 1812, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + }, + "DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA": { + "ip": "3.20.165.131", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + }, + "RATE_LIMITING_RADIUS_SERVER_DATA": { + "ip": "10.28.3.100", + "port": 1812, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + }, + "RATE_LIMITING_RADIUS_ACCOUNTING_DATA": { + "ip": "10.28.3.100", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + }, + "PASSPOINT_RADIUS_SERVER_DATA": { + "nas-identifier": "TIPLABAP101", + "chargeable-user-id": true, + "ip": "52.234.179.191", + "port": 11812, + "secret": "yeababy20!", + "request-attribute": [ + { + "id": 126, + "value": "s:TIP" + } + ] + }, + "PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA": { "ip": "52.234.179.191", "port": 11813, - "secret": "yeababy20!" -}, - -"PASSPOINT_PROVIDER_INFO" : { - "mcc": null, - "mnc": null, - "network": null, - "nai_realms": { - "domain": "oss.ameriband.com", - "encoding": 0, - "eap_map": {"EAP-TTLS with username/password": ["Credential Type:username/password", - "Non-EAP Inner Authentication Type:MSCHAPV2"]} - }, - "osu_nai_standalone": "anonymous@ameriband.com", - "osu_nai_shared": "anonymous@ameriband.com", - "roaming_oi": [] -}, - -"PASSPOINT_OPERATOR_INFO" : { - "osen": "Disabled", - "domain_name_list": ["telecominfraproject.atlassian.net"], - "operator_names": [ - {"locale": "eng", "name": "Default friendly passpoint_operator name"}, - {"locale": "fra", "name": "Nom de lopérateur convivial par défaut"} - ] -}, - -"PASSPOINT_VENUE_INFO" : { - "venue_type": {"group": "Business", "type": "Police Station"}, - "venue_names": [ - {"locale": "eng", "name": "Example passpoint_venue", "url": "http://www.example.com/info-eng"}, - {"locale": "fra", "name": "Exemple de lieu", "url": "http://www.example.com/info-fra"} - ] -}, - -"PASSPOINT_PROFILE_INFO" : { - "profile_download_url_ios": "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig", - "profile_download_url_android": "https://onboard.almondlabs.net/ttls/androidconfig.cfg", - "profile_name_on_device": "AmeriBand", - "radius_configuration": { - "user_defined_nas_id": "FB001AP001", - "operator_id": "AmeribandTIP", - "radius_acounting_service_interval": 60 - }, - "interworking_hs2dot0": "Enabled", - "hessid": null, - "access_network": { - "Access Network Type": "Free Public Network", - "Authentication Type": "Acceptance of Terms & Conditions", - "Emergency Services Reachable": "Enabled", - "Unauthenticated Emergency Service": "Disabled" - }, - "ip_connectivity": { - "Internet Connectivity": "Enabled", - "IP Address Type": "Public IPv4 Address Available", - "Connection Capability": [{"status": "open", "protocol": "TCP", "port": 8888}], - "ANQP Domain ID": 1234, - "GAS Address 3 Behaviour": "P2P Spec Workaround From Request", - "Disable DGAF": false + "secret": "yeababy20!", + "request-attribute": [ + { + "id": 126, + "value": "s:TIP" + } + ], + "interval": 600 + }, + "PASSPOINT": { + "venue-name": [ + "eng:Example passpoint_venue", + "fra:Exemple de lieu" + ], + "domain-name": [ + "onboard.almondlabs.net", + "test.com" + ], + "asra": false, + "internet": true, + "esr": false, + "uesa": false, + "access-network-type": 0, + "hessid": "11:22:33:44:55:66", + "venue-group": 2, + "venue-type": 8, + "connection-capability": [ + "1:0:2", + "6:22:1", + "17:5060:0" + ], + "roaming-consortium": [ + "F4F5E8F5F4", + "BAA2D00100", + "BAA2D00000", + "DEADBEEF01" + ], + "disable-dgaf": true, + "anqp-domain": 8888, + "ipaddr-type-available": 14, + "nai-realm": [ + "0,oss.ameriband.com,21[5:7][2:4],13[5:-1]", + "0,test.com,21[5:7][2:4]" + ], + "osen": false, + "anqp-3gpp-cell-net": [ + "310,260", + "310,410" + ], + "friendly-name": [ + "eng:AlmondLabs", + "fra:AlmondLabs" + ], + "venue-url": [ + "http://www.example.com/info-fra", + "http://www.example.com/info-eng" + ], + "auth-type": { + "type": "terms-and-conditions" } -}, -"open_flow":{}, - -"influx_params" : {} - -} - + }, + "open_flow": {}, + "influx_params": {} +} \ No newline at end of file diff --git a/tests/pyproject.toml b/tests/pyproject.toml new file mode 100644 index 000000000..70ad8d749 --- /dev/null +++ b/tests/pyproject.toml @@ -0,0 +1,7 @@ +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-ra -q" +testpaths = [ + "tests", + "integration", +] diff --git a/tests/pytest.ini b/tests/pytest.ini deleted file mode 100644 index 3fe5d4606..000000000 --- a/tests/pytest.ini +++ /dev/null @@ -1,37 +0,0 @@ -[pytest] -python_files = test_*.py setup_*.py -norecursedirs = .svn _build tmp* -addopts= --junitxml=test_everything.xml -log_format = %(asctime)s %(levelname)s %(message)s -log_date_format = %Y-%m-%d %H:%M:%S -;norecursedirs=out build -num_stations=1 - - -# Cloud SDK settings -sdk-customer-id=2 - -#fIRMWARE Option -firmware=0 - -# Radius Settings -radius_server_ip=192.168.200.75 -radius_port=1812 -radius_secret=testing123 - - -# Testrail Info -tr_url=https://telecominfraproject.testrail.com -tr_user=cicd@tip.com -tr_pass=Open$Wifi123 -tr_project_id=WLAN -tr_prefix=TIP_ -milestone=29 - - - -filterwarnings=ignore::UserWarning - -markers=sanity: Run the sanity for Client Connectivity test - - diff --git a/tests/setup.cfg b/tests/setup.cfg new file mode 100644 index 000000000..d94d4015d --- /dev/null +++ b/tests/setup.cfg @@ -0,0 +1,7 @@ +# setup.cfg +[tool:pytest] +minversion = 6.0 +addopts = -ra -q +testpaths = + tests + integration \ No newline at end of file diff --git a/tests/test_connectivity.py b/tests/test_connectivity.py index 2cdf5803a..17994eeaf 100644 --- a/tests/test_connectivity.py +++ b/tests/test_connectivity.py @@ -5,13 +5,14 @@ import time import allure import pytest +import logging import requests import json pytestmark = [pytest.mark.test_resources, + pytest.mark.sanity, pytest.mark.ow_sanity_lf, pytest.mark.ow_sanity_interop, - pytest.mark.sanity, pytest.mark.uc_sanity, pytest.mark.sanity_55, pytest.mark.interop_uc_sanity, @@ -23,31 +24,38 @@ state = True sdk_expected = True -@allure.testcase(name="Test Resources", url="") +@allure.feature("Test Connectivity") +@allure.parent_suite("Test Connectivity") +#@allure.suite("Test Resources") class TestResources(object): """Test Case Class: Test cases to cover resource Connectivity""" @pytest.mark.test_cloud_controller - @pytest.mark.uc_sanity - @pytest.mark.interop_uc_sanity - @allure.testcase(name="test_controller_connectivity", url="") - def test_controller_connectivity(self, setup_controller, get_configuration): - """Test case to verify cloud Controller Connectivity""" + @allure.testcase(name="Test Cloud Controller", url="") + @allure.title("Cloud Controller Connectivity") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11615", name="11615") - login_response_json = setup_controller.login_resp.json() - response_code = setup_controller.login_resp.status_code - request_url = setup_controller.login_resp.request.url + def test_controller_connectivity(self, get_target_object, get_testbed_details): + """Test case to verify cloud Controller Connectivity + Unique marker: pytest -m "test_cloud_controller" + """ + + login_response_json = get_target_object.controller_library_object.login_resp.json() + response_code = get_target_object.controller_library_object.login_resp.status_code + request_url = get_target_object.controller_library_object.login_resp.request.url print("Login_Request_URL: ", str(request_url)) allure.attach(name="Login_Request_URL: ", body=str(request_url)) print("response_code: ", response_code) allure.attach(name="Login Response Code: ", body=str(response_code)) print("login_response_json: ", login_response_json) - allure.attach(name="Login Response JSON: ", body=str(setup_controller.login_resp.json())) + allure.attach(name="Login Response JSON: ", + body=str(get_target_object.controller_library_object.login_resp.json())) if response_code != 200: pytest.exit( - "exiting from pytest, login response is no 200: " + str(setup_controller.login_resp.status_code)) + "exiting from pytest, login response is no 200: " + str( + get_target_object.controller_library_object.login_resp.status_code)) - gw_system_info = setup_controller.get_system_gw() + gw_system_info = get_target_object.controller_library_object.get_system_gw() request_url = gw_system_info.request.url allure.attach(name="get_system_gw_request: ", body=str(request_url)) gw_system_status = gw_system_info.status_code @@ -59,7 +67,7 @@ class TestResources(object): allure.attach(name="Login_Request_URL: ", body=str(request_url)) pytest.exit("gw_status_check response from gateway: " + str(gw_system_status)) - fms_system_info = setup_controller.get_system_fms() + fms_system_info = get_target_object.controller_library_object.get_system_fms() request_url = fms_system_info.request.url allure.attach(name="get_system_fms_request: ", body=str(request_url)) fms_system_status = fms_system_info.status_code @@ -71,39 +79,39 @@ class TestResources(object): pytest.exit("fms_status_check response from fms: " + str(fms_system_status)) # Provisioning system info - prov_system_info = setup_controller.get_system_prov() + prov_system_info = get_target_object.controller_library_object.get_system_prov() request_url = prov_system_info.request.url allure.attach(name="get_system_prov_request: ", body=str(request_url)) prov_system_status = prov_system_info.status_code prov_system_status_json = prov_system_info.json() print("prov_status_check response from fms: ", prov_system_status) allure.attach(name="prov_status_check response from Prov:", body=str(prov_system_status) + - str(prov_system_status_json)) + str(prov_system_status_json)) if prov_system_status != 200: pytest.exit("Prov_status_check response from Prov: " + str(prov_system_status)) # if gw_status_check != 200: # for i in range(10): - # if setup_controller.get_system_gw().status_code != 200 and i < 9: + # if get_target_object.get_system_gw().status_code != 200 and i < 9: # print("sleeping for 30 sec, gw service is down with response not equals to 200") # time.sleep(30) - # elif setup_controller.get_system_gw().status_code != 200 and i == 9: + # elif get_target_object.get_system_gw().status_code != 200 and i == 9: # pytest.exit("GW service is not up yet, exiting from pytest") # else: # break # # if fms_status_check != 200: # for i in range(10): - # if setup_controller.get_system_fms().status_code != 200 and i < 9: + # if get_target_object.get_system_fms().status_code != 200 and i < 9: # print("sleeping for 30 sec, fms service is down with response not equals to 200") # time.sleep(30) - # elif setup_controller.get_system_fms().status_code != 200 and i == 9: + # elif get_target_object.get_system_fms().status_code != 200 and i == 9: # pytest.exit("fms service is not up yet, exiting from pytest") # else: # break # # available_device_list = [] - # devices = setup_controller.get_devices() + # devices = get_target_object.get_devices() # number_devices = len(devices["devices"]) # for i in range(number_devices): # available_device_list.append(devices["devices"][i]["serialNumber"]) @@ -112,7 +120,7 @@ class TestResources(object): # if get_configuration["access_point"][0]["serial"] not in available_device_list: # for i in range(10): # available_device_list = [] - # devices = setup_controller.get_devices() + # devices = get_target_object.get_devices() # number_devices = len(devices["devices"]) # for i in range(number_devices): # available_device_list.append(devices["devices"][i]["serialNumber"]) @@ -151,79 +159,116 @@ class TestResources(object): assert True @pytest.mark.test_access_points_connectivity - @allure.testcase(name="test_access_points_connectivity", url="") - def test_access_points_connectivity(self, setup_controller, get_uci_show, test_access_point, get_configuration, - test_ap_connection_status, fixtures_ver, get_apnos_logs): - """Test case to verify Access Points Connectivity""" - # print(test_ap_connection_status) - # pytest.exit("") - data = [] - for status in test_access_point: - data.append(status[0]) - connection, redirector = test_ap_connection_status - allure.attach(name="AP - Cloud connectivity info", body=str(fixtures_ver.ubus_connection)) - print("test_ap_connection_status: ", connection, redirector) - expected_sdk = str( - get_configuration["controller"]['url'].replace("https://sec", "\'gw").replace(":16001", "\'")) - print("Expected SDK: ", expected_sdk) - allure.attach(name="Exoected SDK: ", body=str(expected_sdk)) - print("SDK On AP: ", str(get_uci_show.split("=")[1])) - allure.attach(name="SDK Pointed by AP: ", body=str(get_uci_show.split("=")[1])) - for ap in get_configuration["access_point"]: - out = setup_controller.get_device_by_serial_number(serial_number=ap["serial"]) - out = out.json() - if "ErrorCode" in out.keys(): - print(out) - allure.attach(name="Error Device not found in Gateway: ", body=str(out)) - pytest.exit("Error Device not found in Gateway:") + @allure.testcase(name="Test Access Point Connectivity", url="") + @allure.title("Cloud Access Point Connectivity") + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-11615", name="11615") + def test_access_points_connectivity(self, get_target_object, get_testbed_details): + """Test case to verify Access Points Connectivity + Unique marker: pytest -m "test_access_points_connectivity" + """ + + # Logic to Get ubus call ucentral status from AP + connected = True + ubus_data = [] + for i in range(0, len(get_target_object.device_under_tests_info)): + ret_val = get_target_object.get_dut_library_object().ubus_call_ucentral_status(idx=i) + ubus_data.append(ret_val) + if not ret_val["connected"]: + connected = False + get_target_object.get_dut_library_object().verify_certificates(idx=i, print_log=True, + attach_allure=True) + get_target_object.get_dut_library_object().check_connectivity(idx=i, print_log=True, attach_allure=True) + + # Logic to get uci show ucentral and check the target sdk + uci_data = [] + for i in range(0, len(get_target_object.device_under_tests_info)): + ret_val = get_target_object.get_dut_library_object().get_uci_show(idx=i, param="ucentral.config.server") + ret_val = str(ret_val).split("=")[1] + uci_data.append(ret_val) + gw_host = get_target_object.controller_library_object.gw_host.hostname + expected_host = True + for j in uci_data: + if gw_host not in j: + expected_host = False + + + # If Connected but not with expected host + if connected: + if expected_host: + logging.info(("Connected With Expected HOST" + "\n Current GW HOST: " + str(uci_data[0]) + + "\n EXPECTED GW HOST: " + str(gw_host))) + assert True, "Connected With Expected HOST" else: - print(out) - allure.attach(name="Device is available in Gateway: ", body=str(out)) - for log in get_apnos_logs: - allure.attach(name="AP Logs: ", body=log) - if expected_sdk not in get_uci_show: - global sdk_expected - sdk_expected = False - pytest.fail("AP has invalid Redirector") - pytest.exit("AP has invalid Redirector") - if test_ap_connection_status[0] == 0: - global state - state = False - pytest.fail("AP in Disconnected State") - pytest.exit("AP in Disconnected State") - assert False not in data + logging.error("Connected With Unexpected HOST" + "\n Current GW HOST: " + str(uci_data[0]) + + "\n EXPECTED GW HOST: " + str(gw_host)) + pytest.exit("Connected With Unexpected HOST" + "\n Current GW HOST: " + str(uci_data[0]) + + "\n EXPECTED GW HOST: " + str(gw_host)) + else: + logging.error( + "Disconnected from HOST" + "\n Current GW HOST: " + str(uci_data[0]) + "\n EXPECTED GW HOST: " + str( + gw_host)) + pytest.exit("Disconnected from HOST" + "\n Current GW HOST: " + str(uci_data[0]) + + "\n EXPECTED GW HOST: " + str(gw_host)) - @pytest.mark.traffic_generator_connectivity - @allure.testcase(name="test_traffic_generator_connectivity", url="") - def test_traffic_generator_connectivity(self, traffic_generator_connectivity): - """Test case to verify Traffic Generator Connectivity""" - allure.attach(name="LANforge version", body=str(traffic_generator_connectivity)) - assert traffic_generator_connectivity + # @pytest.mark.traffic_generator_connectivity + # @allure.testcase(name="test_traffic_generator_connectivity", url="") + # @allure.title("Traffic Generator Connectivity") + # def test_traffic_generator_connectivity(self, get_test_library): + # """Test case to verify Traffic Generator Connectivity""" + # port_data = get_test_library.json_get(_req_url="/port?fields=alias,port+type,ip")['interfaces'] + # logging.info("Port data: " + str(port_data)) + # eth_table_data = {} + # port = [] + # ip = [] + # for i in port_data: + # for item in i: + # if i[item]['port type'] == 'Ethernet': + # port.append(item) + # ip.append(i[item]['ip']) + # # creating dict for eth table + # eth_table_data["Port"] = port + # eth_table_data["ip"] = ip + # # Attaching eth table to allure + # get_test_library.attach_table_allure(data=eth_table_data, allure_name="Ethernet Table") + # max_num_sta_table_data = {} + # col = ["max possible stations", "max 2g stations", "max 5g stations", "max 6g stations", "max ax stations", + # "max ac stations"] + # max_num_sta = [get_test_library.max_possible_stations, get_test_library.max_2g_stations, + # get_test_library.max_5g_stations, get_test_library.max_6g_stations, + # get_test_library.max_ax_stations, get_test_library.max_ac_stations] + # max_num_sta_table_data[""] = col + # max_num_sta_table_data["Max number of stations"] = max_num_sta + # get_test_library.attach_table_allure(data=max_num_sta_table_data, allure_name="Max number of stations Table") + # + # assert True - def test_ap_conn_state(self): - global state - if state == False: - pytest.exit("AP is in DISCONNECTED State") - global sdk_expected - if sdk_expected == False: - pytest.exit("AP has invalid Redirector") - assert True + # def test_ap_conn_state(self): + # global state + # if state == False: + # pytest.exit("AP is in DISCONNECTED State") + # global sdk_expected + # if sdk_expected == False: + # pytest.exit("AP has invalid Redirector") + # assert True @allure.testcase(name="Firmware Management", url="") -@pytest.mark.uc_firmware -class TestFMS(object): +@pytest.mark.firmware +@allure.feature("Test Connectivity") +@allure.parent_suite("Test Connectivity") +class TestFirmwareUpgrade(object): @pytest.mark.get_firmware_list - def test_fms_version_list(self, fixtures_ver, get_configuration, get_ap_logs): + def test_get_firmware_version_list(self, get_testbed_details, get_target_object): PASS = [] - for ap in get_configuration['access_point']: + for ap in range(len(get_target_object.device_under_tests_info)): # get the latest branch - firmware_list = fixtures_ver.fw_client.get_firmwares(model=ap['model'], - branch="", - commit_id='', - limit='10000', - offset='3000') + firmware_list = get_target_object.firmware_library_object.get_firmwares( + model=get_target_object.device_under_tests_info[ap]['model'], + branch="", + commit_id='', + limit='10000', + offset='3000') firmware_list.reverse() release_list_data = [] for i in firmware_list: @@ -231,95 +276,108 @@ class TestFMS(object): allure.attach(name="firmware_list", body=str("\n".join(release_list_data)), attachment_type=allure.attachment_type.JSON) try: - response = requests.get(ap['version']) + response = requests.get(get_target_object.device_under_tests_info[ap]['firmware_version']) print("URL is valid and exists on the internet") - allure.attach(name="firmware url: ", body=str(ap['version'])) - target_revision_commit = ap['version'].split("-")[-2] - target_revision_branch = ap['version'].split("-")[-3] + allure.attach(name="firmware url: ", + body=str(get_target_object.device_under_tests_info[ap]['firmware_version'])) + target_revision_commit = get_target_object.device_under_tests_info[ap]['firmware_version'].split("-")[ + -2] + target_revision_branch = get_target_object.device_under_tests_info[ap]['firmware_version'].split("-")[ + -3] flag = True for i in release_list_data: if target_revision_commit == i.split('-')[-1] and target_revision_branch == i.split('-')[-2]: - print('target firmware : ' + ap['version'] + " is available in FMS : " + i) - allure.attach(name='target firmware : ' + ap['version'] + " is available in FMS : " + i, - body="") + print('target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'version'] + " is available in FMS : " + i) + allure.attach( + name='target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is available in FMS : " + i, + body="") PASS.append(True) flag = False if flag: - print('target firmware : ' + ap['version'] + " is not available in FMS : ") - allure.attach(name='target firmware : ' + ap['version'] + " is not available in FMS : ", + print('target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is not available in FMS : ") + allure.attach(name='target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is not available in FMS : ", body="") PASS.append(False) break except Exception as e: pass - if ap['version'].split('-')[1] == "latest": + if get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[1] == "latest": for firmware in firmware_list: - if ap['version'].split('-')[0] == 'release': + if get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[0] == 'release': version = firmware['revision'].split("/")[1].replace(" ", "").split('-')[1] if firmware['revision'].split("/")[1].replace(" ", "").split('-')[1].__contains__('v2.'): print("Target Firmware: \n", firmware) allure.attach(name="Target firmware : ", body=str(firmware['release'])) break - if firmware['release'].split("-")[-2] == ap['version'].split('-')[0]: + if firmware['release'].split("-")[-2] == \ + get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[0]: print("Target Firmware: \n", firmware) allure.attach(name="Target firmware : ", body=str(firmware['release'])) break else: flag = True for firmware in firmware_list: - if ap['version'].split('-')[0] == 'release': + if get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[0] == 'release': branch = firmware['revision'].split("/")[1].replace(" ", "").split('-')[1] - commit = ap['version'].split('-')[1] + commit = get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[1] if branch.__contains__('v2.') and commit == firmware['release'].split('-')[-1]: print("Target Firmware: \n", firmware) allure.attach(name="Target firmware : ", body=str(firmware['release'])) PASS.append(True) flag = False break - if ap['version'].split('-')[1] == firmware['release'].split('-')[-1] and ap['version'].split('-')[ - 0] == \ + if get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[1] == \ + firmware['release'].split('-')[-1] and \ + get_target_object.device_under_tests_info[ap]['firmware_version'].split('-')[ + 0] == \ firmware['release'].split('-')[-2]: - print('target firmware : ' + ap['version'] + " is available in FMS : " + firmware['release']) + print('target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is available in FMS : " + firmware[ + 'release']) allure.attach( - name='target firmware : ' + ap['version'] + " is available in FMS : " + firmware['release'] + name='target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is available in FMS : " + firmware[ + 'release'] , body="") PASS.append(True) flag = False if flag: - print('target firmware : ' + ap['version'] + " is not available in FMS : ") - allure.attach(name='target firmware : ' + ap['version'] + " is not available in FMS : ", + print('target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is not available in FMS : ") + allure.attach(name='target firmware : ' + get_target_object.device_under_tests_info[ap][ + 'firmware_version'] + " is not available in FMS : ", body="") PASS.append(False) - assert False not in PASS + assert False not in PASS @pytest.mark.firmware_upgrade - def test_firmware_upgrade_request(self, firmware_upgrade, get_ap_logs, test_ap_connection_status): - for update in firmware_upgrade: + def test_firmware_upgrade_request(self, get_target_object, get_dut_logs_per_test_case, check_connectivity): + for update in get_target_object.setup_firmware(): allure.attach(name='serial: ' + update[0], body="") - if test_ap_connection_status[0] == 0: - assert False - pytest.exit("AP in Disconnected State") assert True @pytest.mark.test_firmware_ap - def test_firmware_upgrade_status_AP(self, firmware_upgrade, get_ap_logs): + def test_firmware_upgrade_status_AP(self): allure.attach(name="firmware Upgrade Status:", body="") assert True @pytest.mark.test_firmware_gw - def test_firmware_upgrade_status_gateway(self, get_apnos, get_configuration, setup_controller, get_ap_logs, - add_firmware_property_after_upgrade): + def test_firmware_upgrade_status_gateway(self, get_testbed_details, get_target_object): status = [] - for ap in get_configuration['access_point']: - ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x") - ap_version = ap_ssh.get_ap_version_ucentral() + for ap in range(len(get_target_object.device_under_tests_info)): + ap_version = get_target_object.dut_library_object.get_ap_version(idx=ap) current_version_ap = str(ap_version).split() - data = setup_controller.get_device_by_serial_number(serial_number=ap['serial']) + data = get_target_object.controller_library_object.get_device_by_serial_number( + serial_number=get_target_object.device_under_tests_info[ap]['identifier']) data = data.json() allure.attach(name=str(data['firmware']) + str(current_version_ap), body="") status.append(current_version_ap == data['firmware'].split()) diff --git a/tests/tox.ini b/tests/tox.ini new file mode 100644 index 000000000..86eb728cd --- /dev/null +++ b/tests/tox.ini @@ -0,0 +1,7 @@ +# tox.ini +[pytest] +minversion = 6.0 +addopts = -ra -q +testpaths = + tests + integration \ No newline at end of file diff --git a/tools/interop_reboot_devices_thread.py b/tools/interop_reboot_devices_thread.py index 9ea6371b8..6394efccc 100644 --- a/tools/interop_reboot_devices_thread.py +++ b/tools/interop_reboot_devices_thread.py @@ -8,7 +8,7 @@ Note: Run this file as it is to reboot all devices at same time from interop lab import sys if "libs" not in sys.path: - sys.path.append("../libs/perfecto_libs/") + sys.path.append("../libs/perfecto_interop/") import argparse import paramiko diff --git a/tools/interop_tools.py b/tools/interop_tools.py index 3c05f1d31..e6f9e9e49 100644 --- a/tools/interop_tools.py +++ b/tools/interop_tools.py @@ -9,7 +9,7 @@ import sys if "libs" not in sys.path: - sys.path.append("../libs/perfecto_libs/") + sys.path.append("../libs/perfecto_interop/") import argparse import paramiko